source tree delete branch graph

Hi folks,

 

I have an additional branch (new_branch) that has forked from master branch, that exists in both remote origin and in my local repository. The new_branch is deleted from origin and from my local repository, however, the branch is still displayed in SourceTree graph! Is there a way to remove it from the graph?

 

Best regards,

Per

1 answer

Deleting a branch within git is simply removing the symbolic name of the branch. The commits on the branch still exists, even after deleting the branch. Therefore you can still see the branch within SourceTree (but the branch has no name anymore - since the symbolic name was deleted by you ...)

That's one of the main features of a VCS: preserving commits ....

If you want to remove the commits from your repository, you need other git methods  (see: http://stackoverflow.com/questions/1338728/delete-commits-from-a-branch-in-git)

 

Be aware: Deleting commits (generally: modifiying commit history) on the remote repository is considered a bad practice (https://developer.atlassian.com/blog/2015/04/force-with-lease/) - nevertheless you still have to use it sometimes. You should be aware of the consequences - and ponder ...

The commits should only continue to show up on the graph if the branch was merged into another branch before deletion. A screenshot might help illustrate exactly what's being asked about here.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

647 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you