bitbucket server - How re-push a fixed commit on Git? -


i fixed code , pushed incorrect commit message. when tried fix commit message, accident reverted commit. situation now:

  • latest commit = correct commit message, changes of previous commit undone
  • previous commit = correct commit content, wrong commit message

all of has been pushed server.

i rid of latest commit, change commit message of previous commit , push server.

i'm happy solutions atlassian source tree command line okay.

if it's last commit, it's easy:

git commit --amend 

this brings editor last commit message , lets edit message. (you can use -m if want wipe out old message , use new one.)

and when push, this:

git push --force <repository> <branch> 

reference: changing git commit message after push (given no 1 pulled remote)


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -