Sync Git Branch With Master | shantysite.com

I wrote this in a page, because I have to keep searching for it.

If you made changes in a different branch, and that got pushed to master, but you need to get them back into your current working branch.

The way I usually do it.

If on Github it is normally.

git rebase origin/master

The only downside to my way is that you have to check in your current branch changes before rebasing.

The way that most people want to do it.

git checkout master 
git pull
git checkout dev
git merge master

Originally published at https://shantysite.com.

Written by

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store