If you want to change a remote commit, you'll have to do this, and then push with -f (which is a force push).
HOWEVER! Be careful with force push. If you accidentally force push to the wrong branch, then it can really mess you up, and if you have teammates who have already downloaded a public branch (like master), then force pushing to master isn't a good idea.
If you've already pushed to a public branch, the better choice is probably to just make a new commit.
Is this also working for remote last commit?
Thank you.
If you want to change a remote commit, you'll have to do this, and then push with
-f
(which is a force push).HOWEVER! Be careful with force push. If you accidentally force push to the wrong branch, then it can really mess you up, and if you have teammates who have already downloaded a public branch (like master), then force pushing to master isn't a good idea.
If you've already pushed to a public branch, the better choice is probably to just make a new commit.
I will keep that in mind. Thank you.