Feb 12
2010
Written by Robert Greiner | posted in Tips and Tricks | View Comments
Version control is essential to the success of any software project. It provides the ability for multiple developers to work on the same codebase simultaneously and allows projects to be versioned for release. However, a great deal of programmers fail to leverage the great benefits of version control for their personal projects.
Luckily, Git and TortoiseGit are extremely easy to install and configure on Windows. Now, there’s no excuse not to version control your code!
The two main ways to install git on your Windows machine are The first way is to use msysgit and Cygwin. I prefer to use Cygwin because of the nifty Linux commands that come along with it. It doesn’t matter which option you choose, but msysgit and Cygwin installations conflict with each other, so it’s probably better to pick one and stick with it.
Simply select the git packages and proceed with the normal Cygwin installation. If you need help with this, visit the Cygwin site for more details.
Also, if you plan on using Github you should go ahead and install openssh through Cygwin as well so you have access to the ssh-keygen command.
Lastly, be sure you point your system path to wherever the Git installation resides on your machine.
Download, Install, and restart your machine.
You should now be greeted with the following message
Now we have a legitimate repository with actual files in it.
Now you can change, add, or delete files within the repository.
Once you are ready to commit back to the repository, right click and select Git Commit just like above.
Cloning is one of the great features of Git, and while it isn’t necessarily important for solo projects, it is important enough to mention here.
Git and TortoiseGit make it extremely easy to get personal version control up and running on your machine. Now you can develop your projects with the piece of mind that version control provides with little hassle and setup.
Nice brief intro, one key thing you missed is importing from another SCM. For example, git-svn makes porting SVN changesets into git trivial. This is important to some people…
isn’t git through cygwin really slow on windows? has something changed in the meantime that makes this not the case?
attosecond,
Good point, I definitely need to add that. I was planning on doing a follow up post that shows how to get started with Github, so maybe I’ll turn your idea into a third post.
Thanks for your comment.
I don’t have any performance problems with git through Cygwin. I’m running Windows 7 on this laptop: http://b2b.sony.com/Solutions/product/VGN-FW550F/B. Maybe there were performance problems in the past, but it appears that they have been fixed.
I don't have any performance problems with git through Cygwin. I'm running Windows 7 on this laptop: http://b2b.sony.com/Solutions/product/VGN-FW550F/B. Maybe there were performance problems in the past, but it appears that they have been fixed.
Good point, I definitely need to add that. I was planning on doing a follow up post that shows how to get started with Github, so maybe I'll turn your idea into a third post.
Thanks for your comment.
I would like how to use this with Visual Studio.
[...] wrote an article a while back showing you how to get started with Tortoise Git and and Cygwin on [...]
That sounds like a good idea for a follow up post. Stay tuned for updates.