Jump to content

[Solution] Gitting the 0.12 branch


Recommended Posts

Posted

I am not familiar with git at all and maybe my GIT isn't configured right or something, but this is the only way I was able to get the 0.12 branch.

Right-click the directory you want to put the branch in and GIT Bash Here.

git init

git remote add origin git://github.com/mangos/mangos.git

git pull origin mangos-0.12

Posted

how has freghar said that? oh, right: questions_about_012++

use this code:

git clone git://github.com/mangos/mangos.git
git checkout -b 243 origin/mangos-0.12

and to update:

git pull origin mangos-0.12

Posted

Yep. Tried that first. Didn't work. Got a message about it not being a valid repository. I don't know why. Like I said, no clue about GIT. I'm just offering this as a second solution that worked for me.

Posted

It is impossible to get only mangos-0.12 or master or any particular version, you always _get it all_. This is equivalent to cloning and then using the command mentioned in the announcement but I guess this one would be less verbose if you are starting from scratch. It is however a waste of time unless you are downloading mangos for the first time or you want to create an additional source tree (and even then you could set up a shared repository without downloading again though that can be more complicated depending on the platform).

EDIT: And you need to change directory after cloning that's why it didn't work for you.

Posted
It is impossible to get only mangos-0.12 or master or any particular version, you always _get it all_. This is equivalent to cloning and then using the command mentioned in the announcement but I guess this one would be less verbose if you are starting from scratch. It is however a waste of time unless you are downloading mangos for the first time or you want to create an additional source tree (and even then you could set up a shared repository without downloading again though that can be more complicated depending on the platform).

EDIT: And you need to change directory after cloning that's why it didn't work for you.

Just to add - you CAN download only mangos-0.12 -- see <refspec> for git-fetch. It will download HEAD of mangos-0.12 and all commits "below", thus excluding the master branch.

Something like

mkdir blah
cd blah
git init
git fetch -n git://github.com/mangos/mangos.git mangos-0.12

Posted

mkdir blah
cd blah
git init
git fetch -n git://github.com/mangos/mangos.git mangos-0.12
[b]git merge FETCH_HEAD[/b]

Cause that is most likely the next question coming up.

Posted
True

Any chance to make git pull work without parameter for updating?

make a branch from that and add a tracking entry for it

something like git branch my_243 --track remotename/remotebranch

(yes, you need to add a remote first -- IIRC you can't track a FETCH_HEAD)

Posted
and how to pull a specific revision from the 0.12 branch ??

That's why hashes are used instead of revision numbers. Even if the commit would be exactly the same, it will have different hash in mangos-0.12, because some of it's parents differs.

So a hard reset or a checkout to specific hash (or other revspec, relative to mangos-0.12) will work. See "git checkout mangos-0.12 && git log --pretty=oneline" or visualize one branch in gitk. You can also use http://repo.or.cz/w/getmangos.git?a=shortlog;h=refs/heads/mangos-0.12 to get the hash.

  • 4 months later...
Posted

i found a solution that seems to work quite well for me ... as i'm also new to git, plz respond if there is any drawback that i was not aware of.

git init
git remote add origin git://github.com/mangos/mangos.git -t mangos-0.12
git pull

for further updates, just use

git pull

Posted

Nope, umbra's solution is the way to go if you only want the 0.12 branch and not the whole "overhead" of the master branch. Been using that for a while now, working fine.

Posted
Nope, umbra's solution is the way to go if you only want the 0.12 branch and not the whole "overhead" of the master branch. Been using that for a while now, working fine.

Yes, I missed the mangos-0.12, sure it is, git-fetch can be also used for that.

I suggested (some months ago) moving the 2.4.3 branch to a separate repository (because people getting master won't need mangos-0.12 and otherwise -- and if they do, they can fetch from both), but I'm not the one with admin access on "mangos" user on github. So ..

  • 2 weeks later...
  • 2 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use