GIT vs. SVN: 1 : 0
I used git for the last 6 month in a big project. The project itself is not maintained
in git but in subversion as this is what developers know and what project leaders like to use
for several reasons.
In fact it’s not a bad idea to actually use subversion as version control system, particularly if
the developer are used to it. Well, I don’t care about that. Thanks to git-svn I could use
git as my subversion frontend. For sure, the distributed architecture of git didn’t help me that much when it comes to exchanging changes as I was the only developer using git.
But thanks to the repository format and git rich featureset, I found myself using git in a
much more productive way than people could use subversion.
Pickaxe:
What I really love is pickaxe. You can use that feature by passing -S to git log causing the log
to search for the string in the commit history and display all the commits that contain these changes.
Actually one of our developers had a problem with a blur event in the java script code, causing
all forms in the script to lose their focus all the time. He was just searching for the point all the
time as going through the commit messages was obviously too much time consuming (with about 100 commits per day). To make a long story short: I’m really a Javascript dumbass, but I just picked the
latest commits having a blur in their name with git log -Sblur and I found 2 promising commits. Showing him the commits actually solved the problem. He just missed one point in the thousands lines
of Javascript containing the blur event that caused the problems. Okay so here are the statistics for that event: Subversion with incremental search, but Javascript knowledge: 3hours. Git without any knowledige and a lazy person using it: 10mins. GIT vs. SVN: 1:0
The other side of the story is, that a fucked up stash sent one week of my work to nirvana recently. But yes, generally it works more than fine.
Did you tried git reflog. As long as there is a reference in git reflog the stashed commit can be accessed and not removed by git gc. Even without a reflog you might try to search for dangling objects using git fsck.
Thank you for the post. I was unaware of this Git search feature. Does *git log -S* search both git commit comments as well as the textual differences?
After scanning the manpages for *git log*, I was amazed at how many options it provides for controling the Git repository search experience and formating the log output. Git never ceases to amaze me!