Jump to content

[Solution] Gitting the 0.12 branch


Guest hytek

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 4 months later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 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