Git push up to a certain commit
Sometimes there are a few commits pending to be pushed but you don't want to push all of them for some reason, e.g. partial deployment, and so you want to push them only up to a certain commit.
Then you can do this:
git push <remote> <commit hash>:<branch>
For example, you have 5 commits A>B>C>D>E pending (for simplicity, ABCDE are commit hashes), and you want to push up to commit "C". The following will then push A, B, and C to origin/master.
git push origin C:master
Reference: http://stackoverflow.com/questions/3230074/git-pushing-specific-commit
Written by John Yau
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#