Archive for May, 2009

Trying out Git source control for windows

I grabbed the latest version from msysgit project and ran the executable.  After it installed I was relieved to see it comes with a GUI application, I was feeling lazy. There is also a version of TortoiseGit which looks similar to TortoiseSVN.

Before finding out how to start the GUI I browsed over this  cheat sheet and this one. I fumbled around because folders with spaces need to be escaped. For example, to change directory in the git console app use “cd Program\ files”.

Then I started checking out the GUI using this walk through. Once I got to the section on branching I really started to like Git. Things are just blazing fast and I don’t have duplicate copies of files all over my drive.

I then tried out GitHub. I built a quick project and submitted using the online instructions. It’s pretty amazing how fast you can push things over the network.  I never want to use a different source control again.

Linus has some cool comments about git if you want to learn more from the creator.

My most used commands:

get init
git add .
add all files under the current directory to the project

git commit … [-m ]
commit , , etc…, optionally using commit message ,
otherwise opening your editor to let you type a commit message

git commit -a
commit all files changed since your last commit

git revert
reverse commit specified by and commit the result. This does *not* do
the same thing as similarly named commands in other VCS’s such as “svn revert”
or “bzr revert”, see below

git checkout
re-checkout , overwriting any local changes

git checkout .
re-checkout all files, overwriting any local changes. This is most similar to
“svn revert” if you’re used to Subversion commands

Disclaimer The information expressed in this blog are my own personal opinions.