Git using the code hosted on github

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/litcangosh/article/details/100988109
  • The first step, download git bash
  1. Create an empty folder on your computer right position, you can use the mkdir command.
  2. Git init command with this directory can become a git repository management.

​​​​​​​​​​​​​​

  • 2. Add the file to the git repository
  1. git add <File> Add File to the git repository. git add. is to add all the files to the git repository.
  2. git commit -m <message> submitted, submitted described later -m
  3. You can master repository with git status of the current state of the moment

  • The third step is to add a remote library
  1. First create a new repository on github
  2. To associate a remote database, use the command: git remote add origin (here is your ssh remote repository GitHub or https)
  3. After linking, use git push -u origin master first push all the contents of the master branch. Push latest changes with git push origin master.

Guess you like

Origin blog.csdn.net/litcangosh/article/details/100988109