File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,23 +45,13 @@ Branches
4545Use ** git rebase** instead of ** git merge** and ** git pull** , when you're updating your feature-branch.
4646
4747``` sh
48- # switch to master branch
49-
5048# fetch updates all remote branch references in the repo and all submodules
5149# --all : tells it to do it for all remotes (handy, when you use your fork)
5250# -p : tells it to remove obsolete remote branch references (when they are removed from remote)
5351git fetch --all -p
5452
55- # pull updates your local files
56- # you should call this command ONLY from master branch
57- git pull origin master
58-
59- ```
60-
61- Then switch to your branch and do a rebase
62-
63- ```
64- git rebase master
53+ # rebase on origin/master will rewrite your branch history
54+ git rebase origin/master
6555```
6656
6757#### More complex scenarios
You can’t perform that action at this time.
0 commit comments