Re: An alternate model for preparing partial commits

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

 



On Fri, Jun 27, 2008 at 8:08 PM, Robert Anderson <rwa000@xxxxxxxxx> wrote:
> If I come back to a branch on which there are several
> commits which have not been pushed yet, how do I know which are
> "temporary" and which are "for real" commits?  I cannot.  It is
> impossible.  The information is not there.

I use the comments for this.  I frequently have comments that say...
"NOT FINISHED, AMEND this".  I make sure they don't get into my public
repo.

You could even automate it with a hook.  You could program your public
repo to refuse a push that contains commits with some keyword like
"WIP", and get used to putting WIP into any new commit until you're
sure about it.  I think you can even program a hook (commit-msg?) to
generate the initial comment for any commit, so you could make it the
default.


> But, all of this is moot when you consider the simple case of a repo
> which has been cloned, on which you'd like to make partial commits,
> and test the committed state before doing so.

You can work in a branch which is not intended to be cloned, and only
merge/rebase to master when you're ready.  You can work in a separate
repo and only push to public when you're ready.  There are several
solutions here for what you want to do.

The answer is simple: you should not be making partial commits to a
repo that has been cloned.  You should instead be working somewhere
else and then pushing to it.  So this whole sentence is just a moot
point itself.


Steve
--
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]

  Powered by Linux