Home Git sync with master and gh-branch
Post
Cancel
Preview Image

Git sync with master and gh-branch

This is just a git flow to recall when I am working with gh-pages and master branches.

Either you are working on gh-pages directly because I don’t want to bother trying to sync master branch with gh-pages all the time when I push commits. This is the normal flow of pushing commit from local branch.

$ git branch
$ git status
$ git add -A
$ git commit -m 'commit msg'
$ git push origin gh-pages

Let’s say after a milestone or a version, gh-pages should update with master branches. rebase plays a big role in this part.

#switch to master branch
$ git checkout master
$ git rebase master
$ git push origin master
#back to gh-pages branch
$ git checkout gh-pages
This post is licensed under CC BY 4.0 by the author.

All essential shortcuts for vim

coder playlist