The basic operation command git

1. Open a command window: right click and choose "Git Bash Here";

2. The cloned into the warehouse on the local github: git clone "github repository url";

 

 The local files are submitted to github up:

1. Initialization: git init

2. Upload all local files: git add (if you want to last a specific file, simply, change the file name ".").

3. add files commit to the repository: git commit -m "comment, submitted something."

4. github go on to create their own Repository, (careful not to check "initialize this repository with a readme"). Once it's created, copy the "clone URL" in github repository address.

5. associated with the local repository to github: git remote add origin https://github.com/testurl/test.git

6. Before uploading pull at: git pull origin master

7. Before submitting to enter username and password.

  git config --global user.name "your username"

  git config --global user.email "your email"

  Check whether the configuration username and email, so you can view:

  git config --global user.name

  git config --global user.email

8. The final step, upload the code up to github: git push -u origin master

 

Guess you like

Origin www.cnblogs.com/irisWhq/p/11576495.html