# gitStu **Repository Path**: simfg/gitStu ## Basic Information - **Project Name**: gitStu - **Description**: git简单命令 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-07-12 - **Last Updated**: 2020-12-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #gitStu git简单命令 **括号中表示需要自己填写** `v1.0` ``` git add git commit -m git commit -a -m git commit -amend git clone git log git log --pretty=oneline git checkout -- file git reset HEAD git remote git remote -v git remote add (pb) (xxxxxxxxx.git) git remote rm (pb) git fetch (origin branch) ``` `v1.1` ``` git tag git tag -a (v1.0) -m "(command annotation)" git tag show (v1.0) git tag -a v1.1 (a740405ee465a86e6ed5e65df9b3a501f387bfc9) git push origin (v1.0) git push origin --tags git config --global alias.(co) (commit) ``` `v2.0` ``` git branch git branch -v git branch -b (new_branch) git checkout (new_branch) git checkout -b (new_branch) git checkout -b (new_branch) (origin/branch) git branch -D git merge (dev_branch) git fetch origin git push origin (local_branch) git push origin :(remote_branch) git push origin (local_branch):(remote_branch) //修改历史标签 git rebase -i HEAD~3 pick-->edit//将上面命令所展示的提交历史页面,将pick修改为edit git commit -amend git reabse --continue ``` `v2.1` ``` git merge (dev_branch) git rebase (dev_branch) git rebase (master_branch) (dev_branch) git rebase --onto (master_branch) (service_branch) (client_branch) //confict fix git add . git rebase --continue //cancel rebase git rebase //pull rebase git pull rebase ``` `v3.0` ``` git stash git stash list git stash apply git stash pop ``` `v4.0`