Branching is a killer feature, as is clean history management, as is the index, and when you find yourself wishing more control over what happens to your source code, wishing for freedom to experiment, all these tools will be there waiting for you.
Except it's not, since it'll output different things depending on whether you have staged anything or not.
This behavior is sometimes useful, but hardly obvious. Many aspects of git are like this, and it's frustrating, speaking as someone who slowly came around to git and now likes it quite a bit and would recommend it, to see its advocates forget or try to talk around just how difficult it is to learn. (1.5 and 1.6 may have improvements, but the claim that git's now roughly as easy to learn as hg or bzr, especially without understanding its internals, is absurd.)
I think part of my problem might have been that I tried to learn Git using Github, which made a multi-user situation out of a single-user situation and was unnecessarily complex. For my current project, the source is not public so I can't have that problem ;-)
But once you grasp that, it's pretty easy, not to mention pretty powerful. For me, Git had certain features that gave me a "wow", as I learned about and got use to using them:
1) Local branching - branching is fast, and merging is relatively painless. This lets you experiment with things without affecting the main branch. Branches are like 'tabs' on my browser, but for my source control. git checkout -b experimental_branch
2) Staging commits - You can fix little things that might not have to do with your current ticket, but add them to separate commits. You can do even split edits done to the same file to two different commits. git add -i
3) Rebasing branches - You can move the root of the local branch if you want the changes since then. Even better, you can reorder the commits as long as you haven't pushed it to a remote repository yet. The same task allows you to squash your commits together for a cleaner history. git rebase -i
4) Stashing changes - You can stash uncommitted changes, so that you can perform other operations that require no uncommitted changes. This is useful when you're working on something, but can't commit it to your local branch yet, and something needs fixing on production right now. git stash
Basically, a lot of what Git enables me to do is switch between tasks easily.
As a single developer, I love this about git. Being able to instantly create a new local branch to work on something, even if I only have an hour or two to devote to it, then switching branches and continuing on with the next important task is awesome. At least for me, it basically encourages exploration and testing new ideas because it takes no time and I know the "real" code is still safe and accessible instantly.
http://git.or.cz/course/svn.html
http://cworth.org/hgbook-git/tour/
http://www-cs-students.stanford.edu/~blynn/gitmagic/index.ht...
I had postponed this moment as long as possible using the svn-without-branches approach. But that wasnt going to help me going fwd. That night I figured I had no choice but to plunge into git asap. I was not looking forward to it AT ALL; It seemed at best a necessary cost.
Once I decided to, it took me under 3 days to mostly "get" git and be productive. (And I would not say I am the quickest learner.) Now I would never, ever, ever go back, even for tiny projects.
Key resources for me: - gitcasts for the basics - git channel on IRC for odd questions - git internals from peepcode for a more solid understanding
Best of luck!
Also, I don't know what crack they are smoking but Perforce is easier to learn than Git for basic stuff. The biggest place that I've seen perforce get complex is where people try to enforce all sorts of bizarre (read: stupid, useless) polices.
However, I would still invest the time to learn git, and yes it is more complex then svn.
Like 10 fingered typing git is something you don't necessarily need, but it is a multiplier on your productivity.
Is that really true? I might just be dumb, but I had a harder time with git. Given that I'm in mostly single-user mode, it seems like I might be more productive with svn simply because I wouldn't have to wrestle with it as much to get going.
Can anyone recommend a "git for people who can understand and operate svn without hurting themselves?" guide? Or is the value of git significantly lessened in single-user mode?