Last active
June 23, 2019 08:15
-
-
Save zorji/262008c0690774d07caf8a7130cb801a to your computer and use it in GitHub Desktop.
Reset Git history to initial commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List all commits (across all branches) for a given file | |
git log --all -- path | |
# How to revert initial git commit? http://stackoverflow.com/a/6637891/412743 | |
git update-ref -d HEAD | |
git commit -m "init commit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment