Git basic commands
- git Add.
- git commit-am "please fill in your NB notes"
- git fetch--all
- git push Origin Master:master
- git remote Add Origin warehouse address
- git Remote RM Origin
- git remote-v
- git rebase origin/master
- git rebase--continue
- git rebase--skip
- git rebase--abort
# # #举例仓库
- Warehouse Address A:[email Protected]:vincentguo/demos.git
- Warehouse Address B:[email Protected]:infra/demos.git
- Developer Warehouse C:[email Protected]:lurenjia/demos.git
# # #单分支开发
- git clone A
- Clone remote Warehouse A to the local repository, where you can see a remote repository with an Origin alias using Git remote-v
- git Add.
- Add an action to add a file to the cache before committing the execution
- Git commit-am "code to submit NB Memo information"
- Submit changes to the head area
- git fetch--all or GIT fetch origin
- Updating remote code locally, but not merging to local code, requires the git rebase command
- Git rebase origin/master
- Rebase the local current code and the master branch of the remote code, where origin is the local alias of the remote repository
- Git push Origin Master:master
- Push the changes to the remote repository, as described in the following command, which means: Push the local master to the master branch of warehouse a
- Origin refers to the local alias of remote repository A that is seen in Git remote-v
- The first master represents the local branch name
- The second master represents the name of a remote branch
Original address: "Git use Notes" Part II: Basic Commands and Single branch development
"Git Use Notes" Part II: Basic Commands and Single branch development