Need help understanding erroneous git commit

Jay Shaughnessy jshaughn at redhat.com
Thu Jun 2 15:54:17 UTC 2011


I didn't realize that that was your original command:

 > git push origin release-3.0.0:origin/release-3.0.0

So, I know |"origin/release-3.0.0" is short for 
"refs/remotes/origin/|release-3.0.0". And I think the part prior to the 
colon is the src ref. Which I think means your local release-3.0.0 
branch. So assuming you already have that branch checked out I think 
that part is a no-op. So, the command boils down to:

 > git push origin |refs/remotes/origin/|release-3.0.0

So, I think what happened is that you pushed to a remote reference on 
origin. I'm not sure what that is used for, if anything.

 > git ls-remote origin

This lists all the refs on origin, the heads, the tags and also these 
"remotes". I'm really not sure if these are anything, maybe the product 
of bad pushes like the one we're discussing. We may just be able to wipe 
these out.

...the heads...
ab71f22d0768b514d126499740010d090261c4ef refs/remotes/origin/master
4f84d2261465ba5b97b1c4ca127722791232107c refs/remotes/origin/rel-service
42aa525be2f00efa77775cbe0daf9f9cd2be97db refs/remotes/origin/release-3.0.0
434616bdc1fa49b90a03b54d6f1fed7bf9227c2d refs/remotes/origin/release-3.0.1
...the tags...

I think we can |get rid of these with (for example):|
||
|> git push origin :|refs/remotes/origin/release-3.0.0


On 6/2/2011 10:36 AM, Simeon Pinder wrote:
> Thx. Agreed Mazz. That's exactly how I committed to the right branch "git push origin release-3.0.0" afterward.  I'm more concerned with figuring out and fixing the erroneous commit so as not to introduce other issues.
>
> -Simeon
>
> ----- Original Message -----
> From: "John Mazzitelli"<mazz at redhat.com>
> To: rhq-devel at lists.fedorahosted.org
> Sent: Thursday, June 2, 2011 10:27:40 AM
> Subject: Re: Need help understanding erroneous git commit
>
> On 06/02/2011 10:23 AM, Simeon Pinder wrote:
>> git push origin release-3.0.0:origin/release-3.0.0
> I'm not a git guru, but I can tell you that isn't the syntax I use. I
> don't know what "release-3.0.0:origin/release-3.0.0" did here.
>
> Whenever I push, I always push a tracking branch whose name is the same
> as the origin/ branch. In my case (and with yours it seems), you have a
> tracking branch called "release-3.0.0" which tracks the remote
> "origin/release-3.0.0".
>
> To push, just do this:
>
> "git push origin release-3.0.0"
>
> If you are not sure about git commands to issue, stay away from the
> command line. Just use "git gui". "git gui" is great, and its very easy
> to use, you typically can't go wrong doing simple things like committing
> and pushing.
>
> I would recommend you use "git gui" from now on for the basics. Fall
> back to the command line if you have more complicating things to do.
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel
>


More information about the rhq-devel mailing list