Good books (or other resources) for learning & using git?

107 views
Skip to first unread message

Brad Knowles

unread,
Feb 13, 2012, 12:25:52 PM2/13/12
to devops-t...@googlegroups.com, Brad Knowles
Folks,

So, now that our next-generation systems architecture has finally gone into production, it looks like we're going to be switching from svn to git for our code repositories. My knowledge of svn is minimal (i.e., anything beyond "svn add", "svn ci", or "svn revert"), and my knowledge of git is even less. Others in the group know more about git than I do (and one guy has actually used it for some small projects), but that's about it.

Does anyone have any suggestions on good books (or other resources) for quickly coming up to speed on git?

Thanks!

--
Brad Knowles <br...@shub-internet.org>
LinkedIn Profile: <http://tinyurl.com/y8kpxu>

Christoph Dorn

unread,
Feb 13, 2012, 12:42:37 PM2/13/12
to devops-t...@googlegroups.com
Brad Knowles wrote:
Does anyone have any suggestions on good books (or other resources) for quickly coming up to speed on git?

Eric Sorenson

unread,
Feb 13, 2012, 4:26:23 PM2/13/12
to devops-t...@googlegroups.com, Brad Knowles
I've collected a number of useful blog posts and docs over the past couple of years, tagged here:



Aleksey Tsalolikhin

unread,
Feb 13, 2012, 8:48:32 PM2/13/12
to devops-t...@googlegroups.com
On Mon, Feb 13, 2012 at 9:25 AM, Brad Knowles <br...@shub-internet.org> wrote:
> Folks,
>
> So, now that our next-generation systems architecture has finally gone into production, it looks like we're going to be switching from svn to git for our code repositories.  My knowledge of svn is minimal (i.e., anything beyond "svn add", "svn ci", or "svn revert"), and my knowledge of git is even less.  Others in the group know more about git than I do (and one guy has actually used it for some small projects), but that's about it.
>
> Does anyone have any suggestions on good books (or other resources) for quickly coming up to speed on git?

Yes! Randal Schwartz's git talk:

http://www.google.com/url?sa=t&rct=j&q=randal%20schwartz%20git&source=web&cd=3&ved=0CDQQtwIwAg&url=http%3A%2F%2Fvimeo.com%2F35778382&ei=G705T-mIB6Pz0gHVg_SfCw&usg=AFQjCNHZbS4mahXo0fV8X1d3dxZRnll8mQ&cad=rja

mind the link for the slides

Best,
-at

Mark Maglana

unread,
Feb 13, 2012, 8:51:49 PM2/13/12
to devops-t...@googlegroups.com

Jake Plimack

unread,
Feb 13, 2012, 8:58:19 PM2/13/12
to devops-t...@googlegroups.com
anyone have any .gitconfig magic they want to share?

I use tree a lot to see where I am, and local/rewrite to order my commits before I push


[user]
name = Kyle Jake Plimack
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red
new = cyan
[color "status"]
added = yellow
changed = green
untracked = cyan
[alias]
tree = log --graph --pretty=oneline --abbrev-commit --decorate --color --all
local = log --pretty=oneline @{u}..HEAD
rewrite = rebase -i --autosquash @{u}
pr = pull --rebase
[apply]
whitespace = strip
[pager]
color = true
[status]
color = true

John Vincent

unread,
Feb 13, 2012, 9:49:24 PM2/13/12
to devops-t...@googlegroups.com
On Mon, Feb 13, 2012 at 8:58 PM, Jake Plimack <jake.p...@gmail.com> wrote:
> anyone have any .gitconfig magic they want to share?
>
> I use tree a lot to see where I am, and local/rewrite to order my commits
> before I push
>
>
Heh. I have a similar alias for hist:

hist = log --all --graph --pretty='[%C(cyan)%h%Creset]%C(bold cyan)%d%Creset %s'

I can't recommend enough the 'git-up' gem:

https://github.com/aanand/git-up

It makes rebasing and such REALLY easy.

I also think the talk from Michael Schwern is awesome for visualizing
how git works:

http://blip.tv/open-source-developers-conference/git-for-ages-4-and-up-4460524


--
John E. Vincent
http://about.me/lusis

Nathaniel Eliot

unread,
Feb 13, 2012, 12:30:35 PM2/13/12
to devops-t...@googlegroups.com, Brad Knowles
http://cheat.errtheblog.com/s/git is a pretty simple go-to resource.

--
Nathaniel Eliot
T9 Productions

Artur Martins

unread,
Feb 13, 2012, 12:45:09 PM2/13/12
to devops-t...@googlegroups.com, Brad Knowles
The book I really like is the Pro Git http://progit.org/book/ - the images even make it so easy to understand how it works.

The best way to learn is actually to create a repo and play with 
git add 
git commit
git log 
git show
-- with a remote repository:
git pull
git push 
git clone

Spend some time creating some aliases, they will be very useful: https://git.wiki.kernel.org/articles/a/l/i/Aliases.html

Artur Martins

David Workman

unread,
Feb 13, 2012, 12:39:49 PM2/13/12
to devops-t...@googlegroups.com

Ian Chilton

unread,
Feb 13, 2012, 4:23:38 PM2/13/12
to devops-t...@googlegroups.com, Brad Knowles

Jim Hopp

unread,
Feb 13, 2012, 12:52:09 PM2/13/12
to devops-t...@googlegroups.com
I like "Pro Git" by Scott Chacon. The full text of the book is
available at http://progit.org/.

There's also an O'Reilly book "Version Control with Git". I started
with that; it describes the internals of git in some detail which
helps to understand how git looks at the world.

-Jim

Al Tobey

unread,
Feb 13, 2012, 11:48:23 PM2/13/12
to devops-t...@googlegroups.com, Brad Knowles
On Mon, Feb 13, 2012 at 9:25 AM, Brad Knowles <br...@shub-internet.org> wrote:
Folks,

So, now that our next-generation systems architecture has finally gone into production, it looks like we're going to be switching from svn to git for our code repositories.  My knowledge of svn is minimal (i.e., anything beyond "svn add", "svn ci", or "svn revert"), and my knowledge of git is even less.  Others in the group know more about git than I do (and one guy has actually used it for some small projects), but that's about it.

Does anyone have any suggestions on good books (or other resources) for quickly coming up to speed on git?

Lately I've been recommending that people already familiar with the basics skip to the last chapter of Pro Git, "Git Internals" for the fastest path to mastery.

http://progit.org/book/ch9-0.html

If you're setting up your own git servers, etc. make sure you look at using gitosis/gitolite/gitlab as opposed to using system users + ssh. It works for a while, but gets painful later on.  Pro Git has a chapter on servers.

-Al

Sean OMeara

unread,
Feb 13, 2012, 12:28:47 PM2/13/12
to devops-t...@googlegroups.com, Brad Knowles
I bought the dead tree version of this to support them

http://progit.org/book/

-s

ranjib dey

unread,
Feb 13, 2012, 1:00:13 PM2/13/12
to devops-t...@googlegroups.com

visual reference and pro giy

Justin Lynn

unread,
Feb 13, 2012, 3:21:08 PM2/13/12
to devops-t...@googlegroups.com
If you're a visual/auditory learner and don't like reading a ton of text to get a rough feel for how things work, I'd recommend the Tom Preston Warner talk on Git Basics ( http://vimeo.com/17118008 ), the Randal Schwartz intro to Git ( http://vimeo.com/35778382 ), and the Google Tech Talk by Linus on the architecture and reasons he built Git ( http://www.youtube.com/watch?v=4XpnKHJAok8 ). These talks helped me get a feel for how to work with git. Also, if you're looking for workflow/branching examples with git, I'd recommend reading this blog post ( http://nvie.com/posts/a-successful-git-branching-model/ ). If you're looking for some good text based links: http://eagain.net/articles/git-for-computer-scientists/ and http://learn.github.com/p/intro.html are both excellent.

Hope this helps,
Justin 'J' Lynn
http://www.jaesharp.com/

On Mon, Feb 13, 2012 at 9:25 AM, Brad Knowles <br...@shub-internet.org> wrote:

Pat O'Brien

unread,
Feb 13, 2012, 12:33:33 PM2/13/12
to devops-t...@googlegroups.com, Brad Knowles
http://progit.org/book/

This is a really handy reference I often use and is a good way to get into git.

-pat

jtimberman

unread,
Feb 16, 2012, 2:30:52 AM2/16/12
to devops-t...@googlegroups.com, Brad Knowles
Travis Swicegood's Pragmatic Version Control Using Git published by Pragmatic Programmers is a concise and good introduction book.


Once you get used to the basics, the man pages are quite excellent.

I recommend avoiding any kind of complicated workflow until you're very comfortable doing branches, merging, rebasing and working with more than one remote.

Chris Westin

unread,
Feb 15, 2012, 12:26:02 PM2/15/12
to devops-toolchain
If you're in the Bay Area, we're having some talks about git at a
meetup tomorrow night: http://www.meetup.com/SF-Bay-Area-Large-Scale-Production-Engineering/events/40058152/
.

Chris

On Feb 13, 9:33 am, "Pat O'Brien" <obrien.patri...@gmail.com> wrote:
> http://progit.org/book/
>
> This is a really handy reference I often use and is a good way to get into git.
>
> -pat
>
> On Feb 13, 2012, at 9:25 AM, Brad Knowles <b...@shub-internet.org> wrote:
>
>
>
>
>
>
>
> > Folks,
>
> > So, now that our next-generation systems architecture has finally gone into production, it looks like we're going to be switching from svn to git for our code repositories.  My knowledge of svn is minimal (i.e., anything beyond "svn add", "svn ci", or "svn revert"), and my knowledge of git is even less.  Others in the group know more about git than I do (and one guy has actually used it for some small projects), but that's about it.
>
> > Does anyone have any suggestions on good books (or other resources) for quickly coming up to speed on git?
>
> > Thanks!
>
> > --
> > Brad Knowles <b...@shub-internet.org>
> > LinkedIn Profile: <http://tinyurl.com/y8kpxu>
Reply all
Reply to author
Forward
0 new messages