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

Git merge messing up changes

I have a branch I've been working on locally, I've been keeping it merged with the main branch up until yesterday.

Today when I did a merge I got some errors, I noticed the main branch has some new changes and it's removing them, essentially as if I had deleted those changes(I didn't touch those files)... I get the same results merging in either direction, it seems to think my files are more up to date even though they are missing lines.

I'm afraid it may be doing it with a lot of files, so I haven't commited the merge.. What's going on?

1 answer

Are you merging while you have uncommitted changes in your working copy? If so, that's a bad idea. You should commit those changes or stash them. I'm surprised SourceTree isn't preventing you from merging and instructing you to do one of those things.

If that's not what's happening, I'm not sure what changes are being deleted. Maybe some screenshots of the Log/History graph would help?

No files are modified, I'll try to get some more info today..I've only been using git for a short time but haven't had this happen before..

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Atlassian Cloud Migration

Cloud Migration preparatory checklist_Atlympics ✈

Hello Cloud migration Atlympics, This post is my entry into the #Atlympics Cloud migrations category. While, I don't boast myself as I have did or doing migrations, but this request came from o...

24 views 0 1
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