git - How would working directory look like in tree diagram? -


i last commit exists in master branch this:

$ git pull origin master 

then make changes in it. noted that, in same time (whenever working on project), co-worker has pushed new commits master branch.

so have rebase changes first , push master branch. here commands:

git pull origin master --rebase git push origin master 

now want know:

  1. how whole process in git tree diagram?

  2. also, can write git pull origin master --rebase other way? mean --rebase shorten $ git checkout workingdirecotry , $ git rebase master ?

after first pull, history like: enter image description here

after make changes, local branch moves on: enter image description here

meanwhile, remote repo has been updated co-worker: enter image description here

then run git pull origin master --rebase, equivalent git fetch origin master && git rebase origin/master.

as result of git fetch origin master: enter image description here

and git rebase origin/master. d , e transplanted old base c onto new base n. master moves old head e new head e'. enter image description here


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -