git merge - git - exclude commits when rebasing -


i have merged feature not ready go master. without realizing rebased bad master branch good.

but not sure how pull bad commits out of other story.

here git log file

commit 15bb0d630f9b9cf59axxxxxxx8100d3a7302 author: moises zaragoza <mzaragoza@xxxx.com> date:   mon jun 1 11:45:31 2015 -0400      updates    commit 3caf183afe3f5d7dcfxxxxxxxa239d44c8dfd11a author: moises zaragoza <mzaragoza@xxxx.com> date:   mon jun 1 11:45:31 2015 -0400      updates   commit 3c6c81c7a3215fcdxxxxxxxb56a5540745c397 author: moises zaragoza <mzaragoza@xxxx.com> date:   wed jun 3 16:59:31 2015 -0400      bad commit should not here  

if haven't pushed code yet, can interractive rebase , delete commits :

git rebase --interractive 3c6c81c7a3215fcdxxxxxxxb56a5540745c397^ 

you end editor commit history:

3c6c81c7a3215fcdxxxxxxxb56a5540745c397 bad commit should not here 3caf183afe3f5d7dcfxxxxxxxa239d44c8dfd11a updates  15bb0d630f9b9cf59axxxxxxx8100d3a7302 updates  

if want delete commit 3c6c81c7a3215fcdxxxxxxxb56a5540745c397, delete line in interractive rebase , save:

3caf183afe3f5d7dcfxxxxxxxa239d44c8dfd11a updates  15bb0d630f9b9cf59axxxxxxx8100d3a7302 updates  

see http://www.git-scm.com/book/en/v2/git-tools-rewriting-history


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -