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

Git merge messing up changes

jmejiaa1986 August 19, 2014

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

1 vote
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2014

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?

jmejiaa1986 August 19, 2014
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
TAGS
AUG Leaders

Atlassian Community Events