git connection GitHub GitHub repository and update the warehouse

GitHub connection

Copy the GitHub repository:

git clone [url]
eg: git clone https://github.com/hjhcos/hjhcos.github.io.git(这是个例子!)

GitHub update

Need permission from the GitHub repository, or use the account to sign in.

The above GitHub repository to a local file updates

1. Download the new branch and data from a remote repository:

git fetch

2. Extract data from a remote warehouse and try to merge into the current branch:

git merge
The update to the local file repository GitHub above.

1. Review the current status of the warehouse codes:

git status

2. Select the file or add all the updates:

git add *

3.commit to the staging area:

git commit -m "注释"

4.pull current latest code:

git pull

5.push to github:

git push origin master

View current Remote library

git remote

Do not use the Delete command messrm

git remote rm [origin]
Published 18 original articles · won praise 3 · Views 1055

Guess you like

Origin blog.csdn.net/hjh_cos/article/details/104075529