0

I prepare a project to employ on Heroku,
after git add . and git commit -am "well prepared to deploy",
It come to me forgetting add .gitignore file.

How could I revert the committed to unstaged status.
git reset does not help.

AbstProcDo
  • 19,953
  • 19
  • 81
  • 138

1 Answers1

2

This is a typical usage scenario of git commit --amend, to amend the current commit with extra changes.

git add -f .gitignore
git commit --amend --no-edit

with -f to add ignored files and --no-edit to avoid launching the editor if the commit message doesn't need updating.

ElpieKay
  • 27,194
  • 6
  • 32
  • 53