3 ms·
Neat, I love how git has these tools that are so clearly targeted at 'I did this before' developer problems. Hey, I keep having to repeat this exact same merge,
by ColinDabritz 12y ago
Neat, I love how git has these tools that are so clearly targeted at 'I did this before' developer problems. Hey, I keep having to repeat this exact same merge, let's automate that.
A similar problem is 'When did this break?', where you do the whole bit with "well it was working before here, but not now, it must have changed somewhere in the middle" then you're doing the binary search of the changesets between etc.
The solution is called "bisecting a problem" as in cutting in half repeatedly. The git command/tool for this is:
http://git-scm.com/docs/git-bisect http://git-scm.com/docs/git-bisect
Using these commands, the system checks out versions in a binary search pattern, and asks you if this code is broken or not, then after some iterations tells you which commit broke things. Really handy. I suspect with some scripting if you could create an automated test you could wire it up to be completely automated as well.
- rqebmm 12y ago`git log --follow $NAME_OF_FILE` will show you each commit that contains a change for the given file. It's very handy when doing the "when did this break?" dance if you've narrowed down the potential files!