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
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

841 views 3 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