简体   繁体   中英

Git Deleted all my changes before I committed them

ok I'm a newb at Git, only been using it for a week, but everything has been fine so far. I'm using GitHub Gui on mac. Accessing one project (just me alone) but from 2 different macs (work and home) So I get home, get latest version from the work commit. Work for a day, now its time to commit from home. I click on sync, and quickly on changes to list my copious changes for the day.. 50+ files or so. GitHub, pops up something about a conflict on a binary file (that I never touched, and shouldn't be in conflict as no one else is editing the project) It gives me some option like you can't commit your changes until you fix and commit this conflict. I can't remember the second option, but I click commit. It commits the conflicted binary file.. but then.... all my list of changes disappears from the changes window, and after loading up the project all the work for the day has gone... !!!!!!! it is back to looking like it did at the start of the day. there is no record of a commit or any changes in github, except for the conflicted single binary file, and the commit from previous day at work.

What happened ? why were there no warnings ? Surely this cannot be how Git is supposed to behave when there is a conflict ? Help please. is my work still somewhere ?

You should try and resolve the merge conflict and then sync again. Just find the spot where Git added to your binary file and delete the nasty stuff it added, plus whatever created the conflict. Then try to sync up again. It may be that Git just saved your recent changes in a local commit.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM