$gitst# On branch master# Your branch is ahead of 'origin/master' by 1 commit.# (use "git push" to publish your local commits)#nothingtocommit,workingdirectoryclean
$gitpull--rebaseFirst,rewindingheadtoreplayyourworkontopofit...Applying:2:1Usingindexinfotoreconstructabasetree...MREADME.mdFallingbacktopatchingbaseand3-waymerge...Auto-mergingREADME.mdCONFLICT (content): Merge conflict in README.mdFailedtomergeinthechanges.Patchfailedat00012:1Thecopyofthepatchthatfailedisfoundin:/home/marslo/Tools/Git/2_GitStudy/.git/rebase-apply/patchWhenyouhaveresolvedthisproblem,run"git rebase --continue".Ifyouprefertoskipthispatch,run"git rebase --skip"instead.Tocheckouttheoriginalbranchandstoprebasing,run"git rebase --abort".
Check the status after pull rebase
branch is changed (master -> no branch)
$gitbr (nobranch,rebasingmaster)master
Status from unchanged and staged -> Umerged
$gitst# HEAD detached at b9709fe# You are currently rebasing branch 'master' on 'b9709fe'.# (fix conflicts and then run "git rebase --continue")# (use "git rebase --skip" to skip this patch)# (use "git rebase --abort" to check out the original branch)## Unmerged paths:# (use "git reset HEAD <file>..." to unstage)# (use "git add <file>..." to mark resolution)## both modified: README.md#nochangesaddedtocommit (use "git add"and/or"git commit -a")
$gitadd.$gitst# HEAD detached at b9709fe# You are currently rebasing branch 'master' on 'b9709fe'.# (all conflicts fixed: run "git rebase --continue")## Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: README.md#$gitbr (nobranch,rebasingmaster)master$gitdiff--stageddiff--gita/README.mdb/README.mdindexb1acca3..12afed2100644---a/README.md+++b/README.md@@-1+1,5@@+<<<<<<< HEAD1:1+=======+2:1+>>>>>>> 2:1
$gitst# On branch master# Your branch is ahead of 'origin/master' by 1 commit.# (use "git push" to publish your local commits)#nothingtocommit,workingdirectoryclean