I want to modify my last committed and pushed message.
After I did git --amend -m "blahblah"
should I git push again?
Do i need -f or anything?
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is generally a bad idea to modified published history. By published history we mean commits that have been pushed upstream.
Nevertheless, if you MUST do so, I find the best approach to delete the upstream branch and then re-push your local branch out.
(change origin if your remote is named otherwise)
After doing so, you must take care to communicate to fellow collaboraters. They will want to reset their local branches to the remote branch after fetching down the latest changes
NOTE: the above will make them lose any commits they haven’t pushed up stream or merged into other branches.