How to revert initial git commit? -



How to revert initial git commit? -

i commit git repository @ first time, regret commit , want revert it. try

# git reset --hard head~1

i message:

fatal: ambiguous argument 'head~1': unknown revision or path not in working tree.

this commit first commit of repository, thought how undo git initial commit?

you need delete branch on. can't utilize git branch -d has safety check against doing this. can utilize update-ref this.

git update-ref -d head

do not utilize rm -rf .git or this wipe entire repository including other branches branch trying reset.

git

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -