Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Tree view Deleted the all main dir

refael
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 11, 2023

I've encountered a critical issue that left me quite concerned. The problem arose when I switched the view to a tree view and selected one of the parent folders, subsequently clicking "Remove File." To my dismay, the entire folder was deleted. Initially, I expected only the files displayed under the tree to be removed, but it turns out that the interface indicates the deletion of the entire main folder.

This situation is particularly hazardous as it's not immediately evident that the intention is to delete the entire folder, including elements not visible in Git.

1 answer

0 votes
Martin Runge
Community Champion
July 12, 2026

Hi @refael

Welcome to the Atlassian community!

Is this still an open question for you, or did you manage to sort it out?

In case it helps anyone landing here later, what you saw is expected behavior, not a bug. When you select a parent folder in tree view and choose Remove, Sourcetree runs a git rm on all tracked files under that folder, staging them for deletion and removing them from disk. If you did this by accident, you can usually recover with git checkout . or git reset --hard HEAD before committing, since the files still exist in your last commit.

Cheers, Martin

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events