Answers for "git update commit comment"

13

git update comment

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
0

how to update a commit

# Edit hello.py and main.py
git add hello.py
git commit 
# Realize you forgot to add the changes from main.py 
git add main.py 
git commit --amend --no-edit
Posted by: Guest on January-05-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language