Looking for a little GIT help (getting code for a certain tag)

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Harry Muscle Offline
Fan
Posts: 505
Joined: Nov 2006
Reputation: 0
Post: #1
I'm wondering if anyone more familiar with GIT could help me figure out how to download the code associated with a certain tag on Git Hub. I'm somewhat familiar cloning and working with the master branch of XBMC on Git Hub, but my brain is starting to hurt trying to get a certain tag Smile

Basically I would like to download all the source code for the 10.1-Dharma tag, but I'm confused on how to do that. How do I specify which tag I want to download when doing a git clone command? Or should I be using git checkout and if so, how do I specify the tag with that command?

Also as a side question, should I be downloading this tag from the master branch or the dharma branch, since it seems both branches have these tags.

Thanks,
Harry
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,570
Joined: Oct 2003
Reputation: 138
Post: #2
This isn't quite what you want, but given that 10.1-Dharma tag is just Dharma HEAD, you should just be able to git checkout Dharma if you have a local branch for it, or git checkout -b dharma origin/Dharma if you don't.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Harry Muscle Offline
Fan
Posts: 505
Joined: Nov 2006
Reputation: 0
Post: #3
jmarshall Wrote:This isn't quite what you want, but given that 10.1-Dharma tag is just Dharma HEAD, you should just be able to git checkout Dharma if you have a local branch for it, or git checkout -b dharma origin/Dharma if you don't.

Cheers,
Jonathan

Thanks, I'm starting to understand more and more how GIT works ... it's a huge change from SVN. Btw, what would I do if 10.1-Dharma tag wasn't the Dharma HEAD. Say I wanted to work with the 10.0-Dharma tag.

Thanks,
Harry
find quote
Harry Muscle Offline
Fan
Posts: 505
Joined: Nov 2006
Reputation: 0
Post: #4
Harry Muscle Wrote:Thanks, I'm starting to understand more and more how GIT works ... it's a huge change from SVN. Btw, what would I do if 10.1-Dharma tag wasn't the Dharma HEAD. Say I wanted to work with the 10.0-Dharma tag.

Thanks,
Harry

I think I figured it out ... although checking out a tag puts me in "detached HEAD" mode ... is that normal?

Harry
find quote
theuni Offline
Team-XBMC Communication Manager
Posts: 1,091
Joined: Oct 2007
Reputation: 2
Location: Atlanta, Ga, USA
Post: #5
Keep in mind that you get the _whole repo_ with git. Trying to grab a specific branch or tag is a svn'ism, let it go! Wink

For some reason, git detaches head when you checkout a tag, I'm unsure why they don't make them act more like branches.

In short, you're looking for this: git checkout -b 10.1-Dharma tags/10.1-Dharma

That creates a local branch at the 10.1 tag. And as JM said, you'll notice that it is identical to the Dharma branch, because the tag is just a pointer to the tip of it.

TheUni
find quote
Harry Muscle Offline
Fan
Posts: 505
Joined: Nov 2006
Reputation: 0
Post: #6
Thanks for all the help.

Harry
find quote