git_ installation

1 is what?

Git is a free open source distributed version control system designed to quickly deal with everything from small to large projects efficiently.

2 Installation

Enter the official website, select the download for your operating system   https://git-scm.com/downloads

 

 Since the external network download speed is very slow, so I chose to find a link to download https://pc.qq.com/detail/13/detail_22693.html

 

 

 

 All Select Next, and then click install.

 

Click the right mouse button, you can see the git graphical interface and a command-line two menus.

 

2 Configuration

Official website Manual https://git-scm.com/docs/git-config 

Configure the user name and mailbox

git config --global user.email "[email protected]"
git config --global user.name "Your Name"

3 Use command

You can view the official document https://git-scm.com/docs/git; user manual https://git-scm.com/docs/user-manual.html

Forget general command, you can use git xx --help or git help xx to call the document viewing, such as git add --help, that is, to bring up a page of links.

  • Generation workspace git init
  • Place the file into the staging area git add filename
  • Submission git commit filename
  • Set up a remote repository alias    git remote add an alias  https://github.com/axuezhonghua/test1.git
  • Submit to a remote repository    git push -u alias master   
  • After the first jump the above operation will be verified by the authentication window

 

 We can see the code into the github to submit or file

 

 Directly modify the file on github, then updated in the local.

  • Update git fetch to pull the remote repository
  • git merge master merge the changes to the local master

 

 

 

Guess you like

Origin www.cnblogs.com/S-Mustard/p/11440467.html