The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

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

DipakP
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!
March 14, 2021

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Hana Kučerová
Community Champion
March 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.

DipakP
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!
March 15, 2021

I have committed the changes to branch1. 

There are no non-committed changes in branch2.

Hana Kučerová
Community Champion
March 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

TAGS
AUG Leaders

Atlassian Community Events