firstly I cloned my own repo from github, because i wanna amend the last commit, so i type "git commit --amend" and push to github, but some errors occur. Some guys said that the operation doesn't allowed by github, unless make another commit, Is that true? and how can i amend the last commit on github?
Asked
Active
Viewed 397 times
1 Answers
4
You totally can do this. However --amend
rewrites history so you have to force the push to github. After using --amend
just use
git push origin {branch_name} --force
Use with caution. This will overwrite history on the remote.

Max Woolf
- 3,988
- 1
- 26
- 39