checkout deletes the logs!

behnampmdg3
behnampmdg3
Hi When I git checkout 3edsa2…. it reverts back to the right commit. But I loose the rest of the commits! When I git log I don't see the rest of the commits! How can I see the list of all commits again? Thanks

Last updated

behnampmdg3
behnampmdg3
[QUOTE=orbrey;n766]Do you mean commits that happened before the checkout you reference, or after, or both (as in you see no other commit information in the log)?[/QUOTE] Hi. Please look at the link I pasted below: There were 2 commits. I "checkout" to the first commit. Then git log is not showing both commits anymore! It only shows 1 commit! What happened to the other commit? I want to be able to go back and front between versions. checkout gdhak2jsdjvsk11... puts the file in "working" stage not "staging" ! Thanks
behnampmdg3
behnampmdg3
[QUOTE=orbrey;n769]That's as it should be - you're moving to a previous commit. When you made that first commit, the second one did not exist, so when you check the logs any commits that have happened since the first commit won't show. If you checkout back to the HEAD revision you'll be able to see the full list of commits again. Also I'm afraid your link doesn't show anything?[/QUOTE] Hi Apologies about the link. I fix it in this reply. Please look at [URL]http://grab.by/yE0E[/URL] . The very left window shows that there are 3 commits. The middle window shows that it has been reverted to the second commit. The third window shows where the HEAD currently it (how is it usefult since I dont have access to other commits that have happened after this?). Now my question is, what if I want to go back to the third commit? I can't see the sha1 version anywhere since I can't see it in the list of the commits. Does it make sense? In other words, what if there have been 30 commits and I revert (checkout) to 2snd commit and then decide to go back to commit number 30? Thank you I believe there is something wrong with the forum add link part. It removes parts of the link! Please use this [URL]http://grab.by/yE0E[/URL] .

1-6 of 6

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.

Post a reply
904 views