Answers for "git commit --amend specific commit"

13

git amend commit message

git checkout branch_name
git commit --amend -m "Modified message"
# if previous commit is not pushed yet
git push
# or if previous comment was pushed in a previous commit:
git push --force-with-lease branch_name
Posted by: Guest on September-14-2021
1

added changes to a specific commit

git add <my fixed files>
git commit --fixup=OLDCOMMIT
git rebase --interactive --autosquash OLDCOMMIT^
Posted by: Guest on June-29-2020
0

git commit --amend with commit id

git commit --amend -m "new commit message"
$ git push --force-with-lease branch-name
Posted by: Guest on December-07-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language