is it safe to remove untracked files from my branch

if i remove untracked files then what happens ? is it safe to remove untracked files from my branch.

After commiting my changes , i want to create new branch but it is not allowing me to do.

2 answers

Removing untracked files is deleting them, permanently. They do NOT get sent to trash/recycle bin, and (because they are untracked) sourcetree can not retrieve them by checking out the original branch or an earlier version.

it means i should not do that or is it fine

It depends on what the files are and what you are trying to do. It depends on your definitions of "safe" and "fine". The shortest answer is this:

If you are 100% sure that you never ever ever want to have access to those untracked files, then you can remove them.

some times Source tree itself is adding changes so those files i want to delete.

finally i removed and working fine...

thank you all for answers.......

The only files SourceTree adds should be Git configuration files (.gitignore, for example). You can remove that safely, but Git will no longer ignore whatever files you wanted to ignore.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

573 views 1 2
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