# I never want to push a given change

4 messages from 2007-07-16 to 2007-07-17. Participants: nathan bullock, Brian Gernhardt.
Thread: https://gitlist.dev/t/9062

## nathan bullock, 2007-07-16 16:18

Subject: I never want to push a given change
Message-ID: <916b88c10707160918n7a4948g5fb55a9d8ace9833@mail.gmail.com>
URL: https://gitlist.dev/e/916b88c10707160918n7a4948g5fb55a9d8ace9833%40mail.gmail.com

```
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?

Thanks,
Nathan

ps. I am really enjoying using git. Thanks.

```

## Brian Gernhardt, 2007-07-17 03:12

Subject: Re: I never want to push a given change
Message-ID: <76ACB85D-2969-406A-AA11-EAF2A104B9E7@silverinsanity.com>
URL: https://gitlist.dev/e/76ACB85D-2969-406A-AA11-EAF2A104B9E7%40silverinsanity.com
In-Reply-To: <916b88c10707160918n7a4948g5fb55a9d8ace9833@mail.gmail.com>

```

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.

~~ B

```

## nathan bullock, 2007-07-17 05:04

Subject: Re: I never want to push a given change
Message-ID: <916b88c10707162204k69e47d25w1c03c04544bcbdf7@mail.gmail.com>
URL: https://gitlist.dev/e/916b88c10707162204k69e47d25w1c03c04544bcbdf7%40mail.gmail.com
In-Reply-To: <76ACB85D-2969-406A-AA11-EAF2A104B9E7@silverinsanity.com>

```
On 7/16/07, Brian Gernhardt <benji@silverinsanity.com> 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

```

## Brian Gernhardt, 2007-07-17 05:06

Subject: Re: I never want to push a given change
Message-ID: <13C065D3-CC85-4455-8A5B-381F6EFCB38C@silverinsanity.com>
URL: https://gitlist.dev/e/13C065D3-CC85-4455-8A5B-381F6EFCB38C%40silverinsanity.com
In-Reply-To: <916b88c10707162204k69e47d25w1c03c04544bcbdf7@mail.gmail.com>

```

On Jul 17, 2007, at 1:04 AM, nathan bullock wrote:

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

Well, I was perfectly willing to go into more detail if needed.  But  
sometimes people just need a push in the right direction.  Plus, I'm  
too lazy to go into details until asked.  ;-)

Glad I could help.
~~ Brian

```
