Sometimes I forget to add some files before commiting. With Mercurial I fix it this way:
hg qinit
- Convert commit to patch
- Update patch
- Convert patch to commit
Can I do anything like this with Git?
Sometimes I forget to add some files before commiting. With Mercurial I fix it this way:
hg qinit
Can I do anything like this with Git?
You are basically trying to change your last commit in Git. This is possible and quite simple.
git commit --amend
is used for this purpose.
The following page gives a detailed example.
https://github.com/abhikp/git-test/wiki/Changing-your-last-commit