Git learning day02

1, created on GitHub a local (local has created a library, repository name is learngit) associated with the remote repository:

  1) Create a warehouse learngit on GitHub;

  2) Use the command in the local learngit repository: git remote add origin [email protected]: your githubname / learngit.git, origin is the default name of the remote library, github.com is the site's domain name may be different;

  3) The local synchronous changes to GitHub repository: git push -u origin master, pay attention to the first synchronization requires the use of -u command followed by the direct use git push origin master can;

 

2, a clone library from GitHub to achieve local association:

  1) create a library learngit2 on GitHub, pay attention to check on Initialize this repository with a README;

  2) Cloning warehouse use git command: git clone [email protected]: your githubname / learngit2.git;

  3) cloned into the local database: cd learngit2;

  4) view the contents of the library: ls, there will be a README.md, the instructions to create success

  

Guess you like

Origin www.cnblogs.com/BASE64/p/11199987.html