3

Is there a way to reset/delete a push (not a commit) in GIT using Sourcetree? Thanks

  • 1
    From the perspective of Git this question doesn't make a lot of sense as written. I presume this is some Sourcetree parlance? – Sukima Mar 08 '15 at 05:17
  • In GIT, a push is a process applied to a set of objects, notably branches of which contain commits. It should also be noted that anything that has been written upstream is usually hard to revert; It is much like changing a history book under someones feet. I am assuming that you want to revert the actions of a push, i.e: bring a certain branch head back to its previous state, or remove a branch from upstream history? – Daniel Park Mar 08 '15 at 08:08
  • @DanielPark Yes I want to bring a certain branch head back to its previous state, –  Mar 08 '15 at 14:25
  • Well to begin with, you will need to make sure that the action of rewriting anything upstream won't have annoying implications for other developers. If you can't fix changes by creating a "fix" commit, then the following [link](http://stackoverflow.com/questions/1616957) will help. Essentially, you need to checkout, move head via reset, then force commit back up. Anything involving a `--reset` can be dangerous, so be careful. – Daniel Park Mar 09 '15 at 15:59

0 Answers0