Skip to content

Instantly share code, notes, and snippets.

@o-az
Created November 16, 2023 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save o-az/876d6438908aa0ab57af5bdb9976c5e1 to your computer and use it in GitHub Desktop.
Save o-az/876d6438908aa0ab57af5bdb9976c5e1 to your computer and use it in GitHub Desktop.
Reset the current branch to the initial commit, keeping the working directory as it is
git reset --soft `git rev-list --max-parents=0 HEAD`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment