You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.
Join groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
I work using pull requests and sometimes they need to be reverted. The command line workflow I use is as documented here: http://tildedave.com/2012/11/24/reverting-a-github-pull-request.html
Basically I create a new branch, find the merge commit SHA and then run
git revert -m 1 SHA
In sourcetree there is the 'Reverse commit...' option, which does a git revert but it will not work on a merge commit because it will not use '-m' (see https://answers.atlassian.com/questions/322559/what-exactly-is-reverse-commit).
How can I use sourcetree to revert a merge commit?
Thanks
If you want to do it in SourceTree, you can only do it with a custom action.
I already created a feature request for this, you can vote for it here.
Zero reference for the command to enter into the custom action to actually answer the question?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Script to run:
git
Parameters:
revert -n -m 1 $SHA
(I prefer it not to automatically commit so I can review the changes, hence the -n parameter)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.