That thought isn't mine alone. During a recent site visit, Groupon's lead talent scout told me the company searches for candidates not on a resume site but, rather, by searching through recent GitHub commits.
[ Work smarter, not harder -- download the Developers' Survival Guide from InfoWorld for all the tips and trends programmers need to know. | Keep up with the latest developer news with InfoWorld's Developer World newsletter. ]
If that isn't enough reason to learn Git, how about a free tutorial? Today's your lucky day. It will only take about an hour.
First, find a Git project or use our sample
Git uses a branch-per-issue model; the local copy is the branch you're currently working on. You can commit to it, roll it back, and, periodically, push it to the GitHub server. The basic operations are Add, Commit, and Push. GitHub is a fee-based corporate repository for code, but open-source projects are free.
Today we'll make an open-source project and put it up on GitHub. We just need a little code.
To get started, pick a project that has some code and a build step. If you don't have any code, you can use The Factory Simulation, which requiresonly Ruby to run. Just create a subdirectory with another subdirectory called "lib" and copy the five files in the right places.
To understand the code, read my previous article on getting started with Ruby. To run the application, go to the root directory and type "ruby factory_multi3.rb" from the command line. To run the tests, change the directory into the test directory and "ruby run_all.rb." (This is code the author, Matt Heusser, wrote and contributed under open source license with contributions from Zach Spencer.)
Next, create a GitHub account
Go to github.com and sign up. Now download and install the latest version of the command-line tools. From here, we'll create a repository through the Web interface, then import our code into GitHub using command-line tools.
Start on the login page, clicking the green "+ New Repository" button at the middle right:
Once you've created the repository, start your command line and run these commands. Make sure you change the directory to your code directory.
Note: Windows has no "touch." Instead, edit and save a blank text file called README.md.
git add *
git commit -m "first commit"
git remote add origin https://github.com/(Username)/(Repository_name).git
git push -u origin master