How did I screw this up so badly?

JoeS
JoeS
I joined a project yesterday that's using git fro its source control. I checked out the project, modified one file and added a few new ones, and confirmed that everything was still working nicely and ready to share with the rest of the team. So, on the advice of someone who's used git a lot more than me, I did a Commit, then a Pull (which apparently was required because there had been some changes while I was working), and then a Push to the master. This morning I got a call from the team leader, who explained (remarkably calmly) that everything was broken. Looking in the git logs, there are two commits from me about a minute apart. The first one (9:10 PM) contains just the files I thought I was committing. The second one (9:11 PM), contains many hundreds of files that I never touched. Apparently these files leave the build in a broken state. The attached SourceTree screen shot may make sense to some of you. It baffles me in a variety of ways. For example, in the 60 seconds between my two entries, there are half a dozen other entries, some of them dating back to July 2nd or 5th. Can anyone explain what happened here? Also, what *should* I have done? My goal was simple: 1. Get the latest files 2. Make some simple edits 3. Share these changes with the team In my happy svn world, this would be simply svn update, edit, svn commit. Apparently in git it's not so simple. Yes, I've read various docs, introductions, and tutorials about git, but clearly I still don't get it. Can anyone explain, as simply as possible, how I should accomplish the above tasks with git and SourceTree? Finally, is there some simple way to undo the damage? The team leader's obviously been using git for years, but he seemed rather uncertain about how to roll it back. Is there some easy way to completely revert things to the way they were at 9:09 PM last night? Thanks, - Joe

Last updated

JoeS

1-3 of 3

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.

Post a reply
1158 views