Saturday, December 12, 2009

git revert wrong commits

If you made any mistake in newly committed data then you can revert the git HEAD to previous commit.
For that u have to run the command

git revert --hard

for eg.,

$git revert --hard ab343n78

you can get this hash value in git log file for that you run this command

$git log

This shows you the Commit details in your local machine

No comments:

Post a Comment