Re: I never want to push a given change

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

 



On 7/16/07, Brian Gernhardt <benji@xxxxxxxxxxxxxxxxxx> wrote:

On Jul 16, 2007, at 12:18 PM, nathan bullock wrote:

> I have been using git for a little while and one thing that I would
> like to
> be able to do is never push a given change, or set of changes.
>
> So lets say I clone a .git repository. Then I make a couple of changes
> that I don't want anyone else to see, do a commit. Then I make some
> other changes that I want everyone else to see and do another commit.
>
> How do I push just the second commit?
> And how do I make it so that every other time I do a push after
> this that
> first commit will never be sent?

Generally the way I do such things is multiple branches.  Have a
branch "local" (or a more descriptive name) that isn't pushed out
anywhere.  Place any changes you do NOT want shared on that brach.
Place changes to be shared on the master or appropriate topic
branch.  Instead of committing changes to be shared on top of the
local ones, use "git rebase" to keep the local branch on top of the
shared ones.


Ahhh, thanks for that. You forced me to go stare at the git rebase documentation
until I actually understood what it does. It looks like that will work
perfectly.

Nathan
-
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