Yesterday I used git for the first time, the reason was that I inherited a task from one of my colleagues and the version control system for the component was git. I’ve learned that Git works best if your OS is Linux, unfortunately my laptop at work is set up with Windows so fingers crossed that this tool won’t hurt my productivity too much…
Anyway, I started with updating my Cygwin setup by installing the following git-packages: git-core, git-gui and gitk. That’s it. I was now ready to use git. So far I’ve only used the command line tool, works ok so far, but haven’t done any advanced operations yet. Here are the steps I performed in order to get started working on the experimental branch of the component:
- git clone git://path-to-repository/component-name.git
- git branch experimental origin/experimental
- git checkout experimental
The clone command downloads a copy of the existing repository. You only have to do this once. Git branch experimental origin/experimental creates a local branch experimental whereas the checkout command checks out the content of the branch specified in the former step to your local repository.
You may find the following resources useful