Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I delete commits?

Alexandre Santos April 24, 2018

So I accidently named a commit not the way I should, and now I'm having all sorts of issues trying to delete it. I'll link a picture where I highlight what is bothering me.

I'm kinda new to all this sourcetree stuff, so can anybody help me to figure out how to delete (if possible) this stuff off my repo?

Also because of these commits I'm not being able to push my new commits to the remote repo, so as soon as somebody can answer the better.

srctrr.png

1 answer

0 votes
NotTheRealStephenSifersNOPENOPENOPENOPE
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 24, 2018

I have had to do this before. Rough steps are to:

  1. Reset Current branch to this commit (Choose your  commit point wisely)
    1. Select Soft if you want to keep the changes
    2. Select Hard if you want to really undo the commit
  2. Re-commit your code with the proper name.

You may have to rebase if you run into push issues.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events