It is possible three actions to edit a commit:
- Change the comment;
- Add one or more files in a commit;
- Remove one or more files in a commit.
Examples
1) If you want to edit the description of your last commit, use the following line:
$ git commit --amend
$ git add file.txt
$ git commit -v -amend
$ git reset HEAD^1 file.txt
$ git commit --amend -v
$ git commit -v file.txt
No comments:
Post a Comment