How to a break a Git commit?
Recently, i need to break a big private commit to two. So that i can work on one of it and push the other to master.
Here is what i did.
$ git checkout big-one
$ git checkout -b small-one
$ git checkout --patch master
$ git commit --amend
$ git show
the --patch arguments will go thru each diff against master and ask you you do want to keep it or revert it.
Refer more about it on - Man git-checkout and -- patch option.
[[ Draft ]]
Written by Nedumaran Rajagopal
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#