A few months ago, my team switched from the ancient Visual SourceSafe to Git. While we tried to minimize the process impact, the change-over was such a big shift in thinking that, months later, I still field several questions a week.
Here is a recent trouble-shooting sample: a colleague got caught in mid-task with an urgent fix, and mucked up some commits in her local repository. Her question: how can only the fix-commit be pushed.
Okay - so I have 2 files that I need to push to repository X for a high priority fix for tomorrow.
I have a 3rd file that I was in the middle of changing when I had to interrupt to get the high priority one fixed and in. It is currently in a state of flux and full of errors.
But when I went to do a pull so that I could push the 2 needed files, I was forced to commit my changes to the 3rd file or lose them. I didn’t want to lose them, so I committed them.
But I need to push the 2 good files and I don’t want to break things by pushing the 3rd not-yet-ready file.
What do I do?????
(end email excerpt)