Re: how do I exclude a commit from set of commits to be pushed.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 03 July 2010, Mahesh Vaidya wrote:
> In the series of commits C1..C8 how do I exclude a commit to be pushed.
> 
> use case -
> I have commits say C1..C8 to be pushed. Due to my pre-receive hook
> commit C4 is complying with commit standard. I have amended C4 to C5 ;
> still C4 shows up in commits to be pushed list.
> 
> git reflog delete --rewrite and git gc --prune did not help
> 
> Thx/ Mahesh

You probably want to squash C5 into C4. Look up 'git rebase --interactive', 
and the 'squash' instruction. A good intro can be found at either 
http://book.git-scm.com/4_interactive_rebasing.html or 
http://progit.org/book/ch6-4.html

In general, it seems you have misunderstood the purpose of the reflog. The 
reflog only keeps track of where your HEAD has pointed previously, and what 
operations you have done. Rewriting the reflog does NOT change the actual 
commit, nor does it rewrite your commit history in any way. In other words, 
there is nothing you can do to the reflog that will affect what you push.

You may want to read the entire Pro Git book ( http://progit.org/book/ ) to 
get a firm grip on the Git object model.


...Johan

-- 
Johan Herland, <johan@xxxxxxxxxxx>
www.herland.net
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]