Skip to content

Commit d557356

Browse files
committed
git commit ammend commands added
1 parent cc6228a commit d557356

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ List of some daily used commands for tech geeks.
3333
- [Clone a repository](commands/git/git-clone-repo.md)
3434
- [Commit changes](commands/git/git-commit.md)
3535
- [Create a new branch](commands/git/git-new-branch.md)
36+
- [Modify Last Commit Details](git-commit-amend.md)
3637
- [Name Email Config](commands/git/git-name-email-config.md)
3738
- [Name Email Config Check](commands/git/git-name-email-config-check.md)
3839
- [Pull changes](commands/git/git-pull.md)

commands/git/git-commit-amend.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
### Modify Last Commit Details
2+
3+
- To modify commit message
4+
5+
`git commit --amend`
6+
7+
- To modify commit author details
8+
9+
`git commit --amend --author "{{NAME}} <{{EMAIL}}>"`
10+
11+
- <b>NAME: </b>New name to replace the author name in commit
12+
- <b>EMAIL: </b>New email to replace the author email in commit
13+
14+
##### Example:
15+
16+
`git commit --amend`
17+
18+
`git commit --ammnd --author Arshad Kazmi <[email protected]>`
19+
20+
##### Related
21+
22+
- [Commit changes](git-commit.md)
23+
- [Push changes](git-push.md)

commands/git/git-commit.md

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
### Related
1616

17-
- [Commit changes](git-commit.md)
1817
- [Push changes](git-push.md)
1918
- [Reset File](git-reset.md)
2019
- [Stage](git-stage.md)

commands/git/readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Daily used git commands
55
- [Clone a repository](git-clone-repo.md)
66
- [Commit changes](git-commit.md)
77
- [Create a new branch](git-new-branch.md)
8+
- [Modify Last Commit Details](git-commit-amend.md)
89
- [Name Email Config](git-name-email-config.md)
910
- [Name Email Config Check](git-name-email-config-check.md)
1011
- [Pull changes](git-pull.md)

0 commit comments

Comments
 (0)