1

I have created one new branch X
Then I merge this branch with local master and push local master to origin
Then I do more changes on branch X

I would like to push these changes to origin but on origin, I would like that only previous commit message get appeared i.e. i would like merge new changes to last commit on origin.

Is it possible?

Zombo
  • 1
  • 62
  • 391
  • 407
  • 1
    So basically, you want to erase the history? Why would you want that? – 1615903 Apr 26 '13 at 07:43
  • i would like to do it because i want that on remote repository only one commit log would show correspond to my changes – Mr. Richhariya Apr 26 '13 at 08:26
  • 1
    That still doesn't answer the *why* part. Anyway, it's not easy to do with basic Git - the remote and local repository are meant to be equal (hence the term cloning). – 1615903 Apr 26 '13 at 08:29

1 Answers1

0

See these other questions related to "how can I revert a previously pushed commit ?"

Since you pushed your commit, the action you want to do will change the remote branch history, and interfere with other users if they have pulled the origin/master branch.

Unless you have very strong reasons for removing that commit from origin's history, just push your additional changes on top of the current origin/master branch.

Community
  • 1
  • 1
LeGEC
  • 46,477
  • 5
  • 57
  • 104