Created
July 6, 2014 16:01
-
-
Save orumin/d364dbd434cfe22ffcc2 to your computer and use it in GitHub Desktop.
2つ前のcommit消してremoteだけに変更を反映させた上で手元の変更は元に戻すやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git format-patch -1 HEAD~~ -o patch #2つ前のコミットからHEADまでをpatch/にpatchとして置く | |
git rebase -i HEAD~~~ | |
#表示された中から要らないcommitの行を削除 | |
git push -f #remoteにpush | |
git reset --hard HEAD~~ 消したコミットの直前まで戻る | |
git am patch/*.patch #patchを適用 & commit | |
#おわり |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment