From 20209c04973d2f863d1abde41ab52b4795284701 Mon Sep 17 00:00:00 2001 From: Sergei Vorobev Date: Wed, 20 Jul 2016 15:10:41 -0700 Subject: [PATCH] Simplify update sync local repo workflow in powershell-repository-101.md The best way to sync a branch for our purposes is to rebase on origin/master --- docs/git/powershell-repository-101.md | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/docs/git/powershell-repository-101.md b/docs/git/powershell-repository-101.md index 193e36d264..785385f782 100644 --- a/docs/git/powershell-repository-101.md +++ b/docs/git/powershell-repository-101.md @@ -45,23 +45,13 @@ Branches Use **git rebase** instead of **git merge** and **git pull**, when you're updating your feature-branch. ```sh -# switch to master branch - # fetch updates all remote branch references in the repo and all submodules # --all : tells it to do it for all remotes (handy, when you use your fork) # -p : tells it to remove obsolete remote branch references (when they are removed from remote) git fetch --all -p -# pull updates your local files -# you should call this command ONLY from master branch -git pull origin master - -``` - -Then switch to your branch and do a rebase - -``` -git rebase master +# rebase on origin/master will rewrite your branch history +git rebase origin/master ``` #### More complex scenarios