News for hackers. Stuff that matters.
Re:Why Git is Better Than X by gcv on Monday December 01, 2008 @02:18PM (#381982)
If you really just want a minimal source control system, Git does the trick well enough. I don't think you need anything more than 'git init' (make a fresh project), 'git commit -a' (commit all new changes except for deleted or renamed files), 'git add' (to add new files), 'git rm' (to remove files), 'git checkout' (for reverting changes), 'git log' (obvious), and 'git diff' (also hopefully obvious). Put a .gitignore file in the root of your project listing globbed filenames for everything you don't want to manage. Run 'git commit' after every sequence of 'git add' or 'git rm' invocations. That's it. You shouldn't need any more documentation than this paragraph.

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.

Re:Why Git is Better Than X by maw on Monday December 01, 2008 @08:07PM (#382438)
'git diff' (also hopefully obvious)

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.)

Re:Why Git is Better Than X by gcv on Monday December 01, 2008 @08:50PM (#382474)
This is precisely why I suggested doing a commit after every sequence of adds and removes.
Re:Why Git is Better Than X by utx00 on Monday December 01, 2008 @09:00PM (#382486)
but that is (one of) the point of the index. that you can build of to a clean changeset to commit. hg mq is easier i think.
Re:Why Git is Better Than X by nostrademons on Monday December 01, 2008 @05:50PM (#382261)
'git mv' for moving files, and I'm overly dependent upon 'git status' for checking what's changed.
Re:Why Git is Better Than X by gcv on Monday December 01, 2008 @07:32PM (#382401)
Agreed on both points, although 'git mv' is optional. As long as the old file is 'git rm'ed and the new file is 'git add'ed in the same commit, git detects the rename quite reliably.
Re:Why Git is Better Than X by jrockway on Monday December 01, 2008 @07:45PM (#382415)
mv is just sugar, though, you can easily copy the file using unix "cp" and delete/add to get the same result. Git does not track renames.
Re:Why Git is Better Than X by etal on Wednesday December 03, 2008 @07:43PM (#385087)
Or, just use the Unix mv, and let Git figure out what you did at the next "git add .".