Git development
 help / color / mirror / Atom feed
* Wrong code on master
@ 2011-12-24  5:09 Jonathan Duncan
  2011-12-24  5:49 ` Frans Klaver
  2011-12-24 15:42 ` Nathan W. Panike
  0 siblings, 2 replies; 4+ messages in thread
From: Jonathan Duncan @ 2011-12-24  5:09 UTC (permalink / raw)
  To: git

I have a developer that committed code that should have been on a branch.  I have created a branch now and locally my master branch is good to go.  However, when I try to push it conflicts, of course, because the repo still wants me to pull the changes and merge them to my master.

The new code from the other developer will eventually be used, but we were not ready for it to be on "master" yet.  I need to push my own code out before that other code gets used.

Will I really have to pull and merge the code to master and then revert?  I have been googling all day, trying to figure out the best way to do this and in the process I fear I have made a mess of my repo.  I have been using git long enough to be dangerous to myself.

Any thoughts?  Got a good article I can read?

Thanks,
Jonathan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Wrong code on master
  2011-12-24  5:09 Wrong code on master Jonathan Duncan
@ 2011-12-24  5:49 ` Frans Klaver
  2011-12-24  6:37   ` Jonathan Duncan
  2011-12-24 15:42 ` Nathan W. Panike
  1 sibling, 1 reply; 4+ messages in thread
From: Frans Klaver @ 2011-12-24  5:49 UTC (permalink / raw)
  To: git, Jonathan Duncan

On Sat, 24 Dec 2011 06:09:06 +0100, Jonathan Duncan  
<jonathan@memoryties.com> wrote:

> I have a developer that committed code that should have been on a  
> branch.  I have created a branch now and locally my master branch is  
> good to go.  However, when I try to push it conflicts, of course,  
> because the repo still wants me to pull the changes and merge them to my  
> master.
>
> The new code from the other developer will eventually be used, but we  
> were not ready for it to be on "master" yet.  I need to push my own code  
> out before that other code gets used.
>
> Will I really have to pull and merge the code to master and then  
> revert?  I have been googling all day, trying to figure out the best way  
> to do this and in the process I fear I have made a mess of my repo.  I  
> have been using git long enough to be dangerous to myself.

Well, the proper way is to revert the commits. That won't result in all  
other developers having to deal with a force-updated branch. If you can  
deal with it you can always

$ git push origin +branch

but I wouldn't consider that a nice thing to do.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Wrong code on master
  2011-12-24  5:49 ` Frans Klaver
@ 2011-12-24  6:37   ` Jonathan Duncan
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Duncan @ 2011-12-24  6:37 UTC (permalink / raw)
  To: Frans Klaver; +Cc: git


On 23 Dec 2011, at 22:49, Frans Klaver wrote:

> Well, the proper way is to revert the commits. That won't result in all other developers having to deal with a force-updated branch. If you can deal with it you can always
> 
> $ git push origin +branch
> 
> but I wouldn't consider that a nice thing to do.

Good information, thank you.  I think I will mark this as a good learning experience for me.  I will make it a point to inform all my team members to work from branches until we are ready for merging to the master branch.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Wrong code on master
  2011-12-24  5:09 Wrong code on master Jonathan Duncan
  2011-12-24  5:49 ` Frans Klaver
@ 2011-12-24 15:42 ` Nathan W. Panike
  1 sibling, 0 replies; 4+ messages in thread
From: Nathan W. Panike @ 2011-12-24 15:42 UTC (permalink / raw)
  To: Jonathan Duncan; +Cc: git

On Fri, Dec 23, 2011 at 11:09 PM, Jonathan Duncan
<jonathan@memoryties.com> wrote:
> I have a developer that committed code that should have been on a branch.  I have created a branch now and locally my master branch is good to go.  However, when I try to push it conflicts, of course, because the repo still wants me to pull the changes and merge them to my master.
>
> The new code from the other developer will eventually be used, but we were not ready for it to be on "master" yet.  I need to push my own code out before that other code gets used.
>
> Will I really have to pull and merge the code to master and then revert?  I have been googling all day, trying to figure out the best way to do this and in the process I fear I have made a mess of my repo.  I have been using git long enough to be dangerous to myself.
>
> Any thoughts?  Got a good article I can read?

I have found this helpful:

http://thread.gmane.org/gmane.comp.version-control.git/77196/focus=77273

>
> Thanks,
> Jonathan--
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Nathan Panike

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-24 15:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-24  5:09 Wrong code on master Jonathan Duncan
2011-12-24  5:49 ` Frans Klaver
2011-12-24  6:37   ` Jonathan Duncan
2011-12-24 15:42 ` Nathan W. Panike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox