Git - adding forgotten files to a commit
If you have new and modified files to be added and committed, using
git commit -am "commit message"
is going to ignore the new files.
To avoid doing another commit, stage the files for a commit and do a
git commit --amend
This will bring up a text editor where you can edit the commit message. Close this and your working branch is clean.
Written by Asim Abdul
Related protips
1 Response
Note, you can also use --amend
to fix typos or improve commit messages without committing any changed files
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#