Skip to content

Instantly share code, notes, and snippets.

@ishu3101
Created February 24, 2016 05:33
Show Gist options
  • Save ishu3101/91b07ba57d1da9691f95 to your computer and use it in GitHub Desktop.
Save ishu3101/91b07ba57d1da9691f95 to your computer and use it in GitHub Desktop.
Git: Keep gh-pages branch up to date (sync) with the master branch
git add .
# see what changes are going to be commited
git status
git commit -m 'Some descriptive commit message'
git push origin master
# go to the gh-pages branch
git checkout gh-pages
# bring gh-pages up to date with master
git rebase master
# commit the changes
git push origin gh-pages
# return to the master branch
git checkout master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment