Jump to content

Recommended Posts

  • Replies 106
  • Created
  • Last Reply

Top Posters In This Topic

Posted

I have a question. Does the git repository system have something like svn revision numbering. I mean how can i see what revision im compiling? And does it have a changelog and if it does what are the commands to display it? Im using linux.

P.S sorry found answer delete post please.

Posted
$ git pull
fatal: Not a git respository

and I dont have Git Bash Here Option on my mangos folder...

if you don't have that option and you are on windows then you didn't install something correctly. please verify that you have correctly installed msysgit and followed the instructions. i have been pulling form the git repo now for a week and have had no issues.

regards,

jdg

Posted

Given the large majority of us who are still getting the hang of Git... I think that this topic should be sticky'd.

(OMG, we have to use command line? Wait! That means I HAVE TO SPELL right?! lol)

Posted
Ok, I've looked all over this topic and have looked through Git's documentation. I used to be able with Tortoise to "Update to Revision" and then put in a revision number to update to. Anyone know how to do that with Git?

git checkout commit-id

example:

git checkout 639a811b8182e39ff1f0b38157d740b7329a2489

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

Posted
git checkout commit-id

example:

git checkout 639a811b8182e39ff1f0b38157d740b7329a2489

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

That's the better approach.

But it's possible to simulate svn in this way .. using

git-reset --hard 639a811b8182e39ff1f0b38157d740b7329a2489 on current branch.

Posted

i have an problem with Git Bash.exe, every time i start is it show up but then it disapear in 1 sec so i cant type any commands or i cant even see what the error is. can some one help me?

edit: i found the error now : C:/Pogram Files\\Git\\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 6

edit: i already found what the problem was, i use version 1,6 instead of gitmsys

Posted
git checkout commit-id

example:

git checkout 639a811b8182e39ff1f0b38157d740b7329a2489

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

Ok, I don't mean to beat anyone's brain into a bloody pulp... but I guess that something I'm not getting here is where do we get the commit id's from? before it was a simple revert to version... now we are pulling this commit id... from where?

:confused:

Posted
Ok, I don't mean to beat anyone's brain into a bloody pulp... but I guess that something I'm not getting here is where do we get the commit id's from? before it was a simple revert to version... now we are pulling this commit id... from where?

:confused:

You will see them here http://github.com/mangos/mangos/commits/master to the right of every commit.

Or if you use the "git log" command you will see the commit id on the top of every commit

Instead of copying the whole 40-hexdigit id you can copy only the first 5 digits too if you want so instead of doing this:

git checkout 964f7bc31fcade7e42a419c34e91dba2fb005e0c

you can do

git checkout 964f7

Posted
Ok, I don't mean to beat anyone's brain into a bloody pulp... but I guess that something I'm not getting here is where do we get the commit id's from? before it was a simple revert to version... now we are pulling this commit id... from where?

:confused:

Oh my god! Was I being a blockhead! forgive me oh God of Development where ever you may be... I am such an idiot... here I am browseing all around the github and staring me right in the face is the branch id, commit id and the parent id... Man, I really need a vacation.

Posted
You will see them here http://github.com/mangos/mangos/commits/master to the right of every commit.

Or if you use the "git log" command you will see the commit id on the top of every commit

Instead of copying the whole 40-hexdigit id you can copy only the first 5 digits too if you want so instead of doing this:

git checkout 964f7bc31fcade7e42a419c34e91dba2fb005e0c

you can do

git checkout 964f7

7 characters/digits is recommended minimum (and used by many apps) ..

Posted
7 characters/digits is recommended minimum (and used by many apps) ..

Ah, okay. In the guide I read somewhere they said 5, but 7 is probably better. Anyway, I usually copy the whole 40-hexdigit, it doesn't take much longer :P I don't really see the reason to shorten it, but I guess it's better when you have to memorize it.

Posted
Ah, okay. In the guide I read somewhere they said 5, but 7 is probably better. Anyway, I usually copy the whole 40-hexdigit, it doesn't take much longer :P I don't really see the reason to shorten it, but I guess it's better when you have to memorize it.

It's better when you want 2-3 hashes to fit on a 80char line.

Like git-diff 4bcd3f6...564dda8

Posted
give it any command to bring the old ref id like 6767 back? instead of the long hex id

No git works on a different principle than svn. Basically when you make changes to code it makes a hash of all the files in your local git repo. From what i've read this eliminates the chances of duplicate commits as any commit that has the exact same source will have the same hash. At any rate that was too much info, the short answer is no there is not any way to get git to give you linear revision numbers as svn does.

Regards,

JDG

Posted
No git works on a different principle than svn. Basically when you make changes to code it makes a hash of all the files in your local git repo. From what i've read this eliminates the chances of duplicate commits as any commit that has the exact same source will have the same hash. At any rate that was too much info, the short answer is no there is not any way to get git to give you linear revision numbers as svn does.

Regards,

JDG

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