Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

A file is deleted from branch1 and present in branch2. Unable to switch branch from branch2.

A file is deleted from branch1 and present in branch2. Unable to switch branch from branch2.

The file is still present in branch2, now when I try to switch from branch2 to branch1, sourcetree is giving me error -

'Your local changes to the following files would be overwritten by checkout'

Why is sourcetree not able to treat the file as deleted.

Any steps to resolve this or any steps I am doing incorrectly?

1 answer

0 votes
Hana Kučerová Community Leader Mar 15, 2021

Hi @DipakP ,

welcome to the Atlassian Community!

How exactly did you delete the file from branch1? Did you commit this change back to branch1?

I think you get this error message because there are some non-commited changes now.

I have committed the changes to branch1. 

There are no non-committed changes in branch2.

Hana Kučerová Community Leader Mar 15, 2021

@DipakP , please, when you go the File status, what you are able to see in Staged files and Unstaged files sections?

st.png

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published 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...

5,769 views 4 12
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you