Jump to content

Recommended Posts

Posted
The hash is in fact generated from something little different (because if it would be only based on files, you'd got twice the same hash in a revert commit), but you've got the point :)

Isn't that the point though? That way if you revert then try to make the same commit it won't let you? I'm still learning git so I'm in no way arguing just working on understanding it a little better.

Regards,

JDG

  • Replies 106
  • Created
  • Last Reply

Top Posters In This Topic

Posted
Isn't that the point though? That way if you revert then try to make the same commit it won't let you? I'm still learning git so I'm in no way arguing just working on understanding it a little better.

Regards,

JDG

By "revert" I mean another reverting commit, not just deleting the current one, which is called reset.

Posted

hi guys i have one problem and dunno how to solve it so ill ask u :)

i downloaded source no problem applied my custom patches everything worked fine but now when i want to update (git pull) i get error: Entry 'src/game/ObjectMgr.cpp' not uptodate. Cannot merge.

i know what it means but i have no clue how i can resolve this problem... it didnt create files like SVN my version their version... so i can see whats wrong and fix it... is there some kind of command to see whats wrong and resolve it?

thats one thing and other thing why it wants to update all my patched files? do i have to apply patches after every update?

Posted
git checkout commit-id

example:

git checkout 639a811b8182e39ff1f0b38157d740b7329a2489

and then to create a new branch for that commit, do git checkout -b branchname

is there a way to copy and paste this ? 40 charaters or so to type... i an look at this page

http://github.com/mangos/mangos/tree/87de4189e1ea39a967c2193eff7567f15bd28cd5

now that is revesion for 10/26/08 Lest last one for that day

now i would type in

git checkout 9f890e8df890942e64a1902c99806bbf8332f3b9 <--tree

if im just making a typing mistake ill know, but not knowing if im even doing it right is worst

am i even close to doing it right ? for getting core for that date ?

puls 3rd time trying... i get fatal: refrence is not a tree

plus i read some where you only need to type in the first 5 charaters ? is this right ?

Posted
puls 3rd time trying... i get fatal: refrence is not a tree
Did you do a "git fetch origin" before doing checkout ? Remember that checkout doesn't download anything, it just changes to a specific version that you have already downloaded. Fetch downloads stuff. Pull is just a shortcut for fetch + merge.
Posted
is there a way to copy and paste this ? 40 charaters or so to type... i an look at this page

http://github.com/mangos/mangos/tree/87de4189e1ea39a967c2193eff7567f15bd28cd5

now that is revesion for 10/26/08 Lest last one for that day

now i would type in

git checkout 9f890e8df890942e64a1902c99806bbf8332f3b9 <--tree

if im just making a typing mistake ill know, but not knowing if im even doing it right is worst

am i even close to doing it right ? for getting core for that date ?

puls 3rd time trying... i get fatal: refrence is not a tree

plus i read some where you only need to type in the first 5 charaters ? is this right ?

Don't get confused, that command checkouts a tree, but the tree has different SHA-1 hash. The one you specified is the commit hash (which has a tree object depending on it).

http://eagain.net/articles/git-for-computer-scientists/

  • 2 weeks later...
Posted

How can you clean the source code with Git??? I apply the Ahbot patch to it but when I want to update AHbot how do you clean it? I know how to update the mangos source code.

Posted
How can you clean the source code with Git??? I apply the Ahbot patch to it but when I want to update AHbot how do you clean it? I know how to update the mangos source code.
You can reset your local branch to a specific version (discarding all other changes) with git reset. For example if your current branch was set to origin/master before you applied the patch, you would use:

git reset --hard origin/master

  • 2 weeks later...
Posted
How can I revert/reset just a particular patch, like this one for example?

"git pull git://github.com/Blaymoira/mangos.git master"

Haven't tried this myself but I think it might work according to the manual http://www.kernel.org/pub/software/scm/git/docs/git-revert.html. If you look at the gitk history, where you merged with that branch you should see the merge commit for the pull (sha A) having two parents, one from mangos/mangos (sha B ) and one from blaymoira/mangos (sha C). Try the command:

git revert -m B A

Posted

well,I got another problem .I used git for windows,and I downloaded the source successfully,however,the code were packed,only a .pack file and a .idx file.I tried to use git-unpack-objects,but after the extration,there are many unkown files,not the C++ file,thus I can not use VC to compile it.Can anyone help me ?

  • 1 month later...
Posted
How can i get branch 308 ?

git clone git://github.com/mangos/mangos.git 308 ?

The same way as mangos-0.12, read 303 announcement or any of the N threads where it has been answered.

Posted

I've seen so many people run into issues using "git clone" that it's getting nuts. The best way to get any of the branches is to "git init" a dir, then "git pull origin master" or replace master with the branch name. I use this way, and it works fine for me.

Posted

Can someone, anyone, please tell me how to fix this:

fatal: write error (Bad file descriptor)

Not even the git help forums have this one. They keep saying that it was an issue that was resolved. But no matter which version of msysgit I get, it shows up whenever I try to get any git file.

Posted

how do i download a non-master branch? i want to download mangos-0.12... how do i do that?

git pull mangos-0.12 ?

also, how do i make so that when i type git pull it updates mangos 0.12 and not master branch?

Posted
how do i download a non-master branch? i want to download mangos-0.12... how do i do that?

git pull mangos-0.12 ?

also, how do i make so that when i type git pull it updates mangos 0.12 and not master branch?

use SEARCH

Posted
The same way as mangos-0.12, read 303 announcement or any of the N threads where it has been answered.

Just my quote few posts above.

And the number N is getting bigger, you're ~27th person who I replied on this paticular question.

Posted

I wanted to make a fresh_git.bat but failed until i used call, wich forces git not to close the .bat but to return.

Anyways, here is the.bat wich works fine.

cd mangos_upd
call git init
call git remote add origin git://github.com/mangos/mangos.git
call git pull origin master
cd.. 
pause

Posted

Incedible guy's .

Been Away for a long time (even forgot my account on as i see the different server hehe ) and i only remember i had to download evrything from different sources.

I'm a SVN user myself so git don't have to much problem's with me.

A nice way to get your sources and keep them updated like this. :)

  • 2 weeks later...
Posted
Can someone, anyone, please tell me how to fix this:

fatal: write error (Bad file descriptor)

Not even the git help forums have this one. They keep saying that it was an issue that was resolved. But no matter which version of msysgit I get, it shows up whenever I try to get any git file.

I get the exact same error, and I'm stumped. I've disabled my antivirus and firewall, no improvement.

Anyone know the answer?

×
×
  • 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