Getting Started with Git

Version 181.1 by David Avendasora on 2011/04/29 15:44

Got Git? No? Get Git

Learn About Git

  • Learn the concepts.
    • This is an excellent tutorial on the basic concepts behind Git
  • Linus Torvalds talks about git
    Have a Good Laugh here as Linus Torvalds Evangelizes git. NOTE: This isn't really learning, but it is way more fun and gives you insight into the motivation behind git.

Get Started with Project Wonder

The best way to learn a new concept is to actually use it, and what better way than to do something practical like clone (checkout) the Project Wonder source code

Use Git with a Subversion Project

OK, so you want to use Git but you are working on a team project that is hosted in a subversion repository ... and it is making you depressed :-( . Well, you can still use Git to manage your local SVN working copy and be happy again

I recommend you just use the git+svn protocol.

Git Goodies for WebObjects Developers

This is a list of tools that other WebObjects developers have found to be helpful. It's not a comprehensive list, and if you find things not listed here please add them

EGit

EGit is a plugin for Eclipse 3.6. It's not as good as Tower or GitX, but you can use it for most tasks (add, commit, push, pull).

  • EGit/Git For Eclipse Users
  • User Guide
  • Installation
    1. In Eclipse, select Help > Install New Sofware...  
    2. Select the "Helios" download site from the Work with: combo box
    3. Expand the "Collaboration" group
    4. Select the EGit plugin, click Next
    5. Complete the install process and agree to the license, etc.
    6. Restart Eclipse.

Git Bash Completion

This is really an absolute necessity and a huge productivity improvement. Basically you need the bash completion script from the source tarball and use your shell profile to include it whenever you open a shell. See the Auto-Completion section on this page:
Git Bash Auto-Completion

GitX git GUI

GitX is an awesome FREE history viewer made for OS X. It is a better way to visualize your branch and commit history of your git repository. However, power users (aka "cool kids") will probably only use it for history viewing while they continue to use the terminal command line for checkouts, branching, staging, rebasing and committing.
GitX Home Page

Open in GitX

Open In GitX Finder Droplet

Git Tower

Git Tower is a commerical app for those of you who just get panic attacks at the thought of using the Terminal.

I use Tower (bought it), but only for committing and fixing merge conflicts. I think Tower misses quite a bit of the flagship feature of GIT: branches. You can't see a branch tree graphically, like you can with gitX or even the command line (git log -graph -color, IIRC). But it's cool for committing. For everything else I use command line.
 Miguel Arroz

Unique Git Concepts

Rebasing

Rebasing is unique to git. There is no counterpart in Subversion.

Rebasing cuts down on the spaghetti history of merging and helps to keep history nice and linear.

Conceptually, when I rebase my current branch A on another branch B, git removes all my branch A commits back to the common ancestor of A and B, stashes those commits away temporarily, moves the head of the current branch A to the tip of the other branch B, and then re-applys all my stashed commits as new commit patches to my branch B.

However before using it on work that is shared with others you MUST follow the these rules, otherwise you will screw everyone else on the project.