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.
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.
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.