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 Join to answer
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 ...

245 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot