Skip to content

Instantly share code, notes, and snippets.

@nibb13
Created January 14, 2018 14:19
Show Gist options
  • Save nibb13/39a47944e9ee8633cfa4cdb396fe7652 to your computer and use it in GitHub Desktop.
Save nibb13/39a47944e9ee8633cfa4cdb396fe7652 to your computer and use it in GitHub Desktop.

If you have a low # of commits and you don't care if these are combined into one mega-commit, this works well:

unstage the files (replace 1 with # of commits)

git reset --soft HEAD~1

create a new branch

git checkout -b NewBranchName

add the changes

git add -A

make a commit

git commit -m "Whatever"

ref: https://stackoverflow.com/a/43611676

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment