topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday March 19, 2024, 1:04 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Resources for learning git?  (Read 45693 times)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Resources for learning git?
« on: January 01, 2010, 04:01 AM »
I'm making another attempt at learning git and am currently trying to read the following:

Pro Git
Git Community Book

So far they seem pretty good -- at least it's making more sense to me than the last time I tried ;)

Any git-using folks have any recommended git-learning resources?

parkint

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 119
  • It's bad luck to be superstitious
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #1 on: January 22, 2010, 08:41 PM »
I am a big fan of git.  Look at this thread I started just the other day.
I highly recommend the Pro Git book, but it may be a bit too deep as a first introduction.
I found a lot of valuable information in Branching and Merging with git.  This is one of those articles I find myself returning to read often; each time learning something new!
There is also a lot of great information in the online Help at github.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #2 on: January 23, 2010, 03:04 AM »
I hadn't seen the "Branching and Merging with git" article, nor the github online help.

Thanks for pointing these out :)

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #3 on: January 23, 2010, 11:27 AM »
The original blog seems to be down but check out this pdf of the article I found online, it's a excellent brief intro the branches and merges.

http://ietl.univ-lyo...rging_by_example.pdf. I also attached it in-case the pdf disappears from the web too.

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #4 on: January 23, 2010, 11:38 AM »
O/T - I thought being a git came to all men of a certain age?

Darwin

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 6,984
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #5 on: January 23, 2010, 11:44 AM »
O/T - I thought being a git came to all men of a certain age?



I suspect that most North Americans won't be familiar with the term "git"...

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #6 on: January 23, 2010, 12:20 PM »
I thought being a git came to all men of a certain age?
Some of us are biggity from the start!

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #7 on: January 23, 2010, 05:35 PM »
The original blog seems to be down but check out this pdf of the article I found online, it's a excellent brief intro the branches and merges.

http://ietl.univ-lyo...rging_by_example.pdf. I also attached it in-case the pdf disappears from the web too.

Thank you for pointing this out and taking the time to increase the chances of availability  :Thmbsup:

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #8 on: January 24, 2010, 12:26 PM »
OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK  :o

I got it. I am now changing everything over to git.  :-[

I am 24 minutes into a 1 hour 10 minute talk by God Linus Torvalds about git and I am thoroughly embarrassed to have resisted this long. I now understand that I stuck with SVN because I was comfortable with SVN. I am a moron. (I'm not joking here. I am complete serious.)  :(

I will begin moving all my projects to git, one by one, as I work on them.

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #9 on: January 24, 2010, 12:32 PM »
Linus Torvalds has quipped about the name "git", which is British English slang for a stupid or unpleasant person: "I'm an egotistical bastard, and I name all my projects after myself. First Linux, now git."

parkint

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 119
  • It's bad luck to be superstitious
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #10 on: January 25, 2010, 08:48 AM »
OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK  :o

I got it. I am now changing everything over to git.  :-[

I am 24 minutes into a 1 hour 10 minute talk by God Linus Torvalds about git and I am thoroughly embarrassed to have resisted this long. I now understand that I stuck with SVN because I was comfortable with SVN. I am a moron. (I'm not joking here. I am complete serious.)  :(

I will begin moving all my projects to git, one by one, as I work on them.
Don't be so hard on yourself.  We all must learn to overcome the "comfortable".

It is great to see another 'convert'  <g>
BTW: Take a look a this recent thread {written by a truly brilliant new member who's intellect is only overshadowed by his humility}

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #11 on: February 07, 2010, 10:58 AM »
Ummmm. :huh: Uhhhhh. I... I, uh... :-[ Well....

I think I am going to go with Mercurial instead of git. Primarily because it really does seem to be true that the git community doesn't consider the Windows community to be worthy of git. I enjoy using both Windows and Linux, so I need a tool that works on both.

And, yes, Mercurial being written in Python does give it a +1.

Additionally I do prefer to use GUI tools over command line tools, especially when I am already using a (GUI) IDE to work on the code under SCM.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Resources for learning git?
« Reply #12 on: March 08, 2010, 01:20 PM »
So, lemme re-use this thread, seems appropriate enough...

I've been playing around with GIT for a bit now, and feel relatively comfortable with it - the basics (enough for using it basically in a "mostly centralized" mindset) are definitely drop-dead simple, topic-branch workflow doesn't seem too complicated and definitely has value, and the more fancy stuff can be ignored until you find yourself needing it.

In fact, I'm comfortable enough with git that I'd like to conver my existing subversion repositories over. I've found a bunch of guides, and one using git-svn seems to be able to do the trick... however, I want to make sure I get my entire version history over, I want it "in a sane state" (ie, svn /tags should be git tags and not branches, there should be no references to the old svn repo when done, et cetera). I think the guide I found will ensure this (even if I might have to do some manual metadata pruning and tag pruning), but I'd like to hear if any other members have experience with this process?

Furthermore, the git-svn conversion process is slow, even across my gigabit LAN. fSekrit is a pretty moderately sized repository (91 commits, some 900(?) changesets, 1.4meg server-side repository). Could I copy the repository from my linux server and do git-svn locally with a file:// reference?

Also, are there any post-conversion tips? I realized that after the initial test conversion of fSekrit, the .git folder was pretty darn large - the actual filesize was a bit more than the server-side subversion repository (iirc), but the actual on-disk usage was much larger because of filesystem cluster size. After "git repack -a -d", I went down to a 423kb repository, 728kb on-disk --- smaller than the original subversion repository. If it really did grab the entire version history and relevant metadata, that's pretty nice (and consistant with what I've read elsewhere).

And gosh darn, the git network protocol is SO much faster than subversion's. In the time it takes me to commit ~10 file changes for fSekrit, I could push ~3.5meg/~500files of Notepad++ CommunityRelease via git... not to mention that regular non-pushing commits under git are of course instantaneous because they're done locally.
- carpe noctem

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #13 on: March 08, 2010, 01:30 PM »
Could I copy the repository from my linux server and do git-svn locally with a file:// reference?

Why not make the git clone of the svn repo on the server? Though git needs to be installed there of course. It's only a once off process though anyway, it'd probably finish in the time you'd spend looking for a faster solution ;)

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Resources for learning git?
« Reply #14 on: March 08, 2010, 01:55 PM »
Could I copy the repository from my linux server and do git-svn locally with a file:// reference?

Why not make the git clone of the svn repo on the server? Though git needs to be installed there of course. It's only a once off process though anyway, it'd probably finish in the time you'd spend looking for a faster solution ;)
I do have git there (as well as gitosis - seems pretty nice), but apparently not the git svn extensions... they don't seem to be in gentoo's portage, and I'm too lazy to figure out where to find them at the moment - other than that, yeah, it'd probably work ;). If it can do file:// urls, copying the repos to my workstation and doing it from here would work too... guess I'll end up testing that before too long :)

Anyway, I'm still interesting in hearing what experiences other people have, especially if using nonstandard folder structure (fSekrit initially did, version history became rather messy after I fixed it - this might be an opportunity to use git's history-editing capabilities). Also, "git tag -l" doesn't show any of my tags, but I can see tag references in TortoiseGit's interface... they seem to reference the "remote" location, though. So the conversion process indeed doesn't seem to be 100% automagic.

By the way, a completely unrelated question: would it be possible to "slice off" parts of a repository? Let's say, not so hypothetically, that once I reach version 1.5 I'd like to opensource fSekrit, but not provide source or history of anything older than 1.5... but I'd like to be able to keep the entire history myself, resulting in a setup somewhat similar to:
local repo: full version history
local server: full version history
public server: history from 1.5 and onwards
- carpe noctem

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #15 on: May 01, 2010, 07:55 AM »
Though it requires an installation of Git separately [1], I've been using SmartGit a bit.  My understanding is that there is a license which is free for non-commerical use:

  http://www.syntevo.com/smartgit/license-agreement.html

I got a portable version and have it set up with a portable Java installation.

It has been helping me develop my mental model of Git and thus I thought it might count as a resource for the learning of Git.

Now if there were something comparable for Mercurial :)  SmartGit seems to support Mercurial now.


[1] I've tested with portable msys git and have been using it mostly to clone other things.  I didn't manage to figure out how to "git init" so that part I've done via the command line. Figured out how to "git init" with SmartGit.
« Last Edit: May 03, 2012, 06:50 PM by ewemoa »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #16 on: May 04, 2010, 07:47 AM »
Perhaps for bit-by-bit learning the following will come in handy:

  http://gitready.com/

Edit: Doh!  I had posted a link for a Mercurial resource -- amended...
« Last Edit: May 10, 2010, 07:22 AM by ewemoa »

steeladept

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,061
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #17 on: May 04, 2010, 09:01 AM »
Not that I really know exactly what I am looking at (not being a programmer and all - at least not yet smiley), but from what I see on the comparisons of this site:

http://www.versioncontrolblog.com/comparison/

I would say Mercurial may be the way to go....

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Resources for learning git?
« Reply #18 on: May 04, 2010, 10:48 AM »
Not that I really know exactly what I am looking at (not being a programmer and all - at least not yet smiley), but from what I see on the comparisons of this site:

http://www.versioncontrolblog.com/comparison/

I would say Mercurial may be the way to go....
What in particular makes you say so?
- carpe noctem

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
Re: Resources for learning git?
« Reply #19 on: May 10, 2010, 07:15 AM »
The article that makes git click for me was http://www.newartisa...m-the-bottom-up.html . It doesn't makes me understand everything, but what I read afterwise got more sense. Learning a tool from the bottom is a strange way of learning but it works really well. I think it that way : Git archive is a graph of node where you move your HEAD cursor. The rest is knowing the commands to move around the graph, clone part of it, etc... It took some time to learn the commands since they are a bit awkwards.
I use cygwin, not the msys port. The msys port was a bit incomplete at the time I learned it. It should be better now though.
Blog & Projects : Blog | Qatapult | SwiffOut | FScript

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #20 on: May 16, 2011, 05:58 PM »
About a year later...

The article that makes git click for me was http://www.newartisa...m-the-bottom-up.html .
I'm revisiting a PDF version of the article and finding it helpful  :Thmbsup:

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #21 on: May 16, 2011, 08:13 PM »
Still making my first pass through Mastering Git Basics (Erlang Factory SF Bay Area 2010 Talks), but am finding the alternating slides of "git command with brief example(s)" followed by a corresponding summary picture slide, to be a nice idea.

Thanks to phitsc for the ACCU 2011 mentioning where I first learned about a version of this talk :)


P.S. The ACCU version of the talk seems to be longer and gets further along in the slides.
« Last Edit: May 17, 2011, 04:29 AM by ewemoa »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #22 on: May 25, 2011, 10:57 PM »
I highly recommend the Pro Git book, but it may be a bit too deep as a first introduction.
Recently I came across a .epub version.  The online version seems a bit easier to read, but it's nice to be able to access the content offline.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #23 on: May 03, 2012, 07:13 PM »
(as well as gitosis - seems pretty nice)

On a side note, I saw on SuperUser that:

"Gitosis is deprecated and isn't being developed anymore, so if bugs are found they will likely never be fixed. Gitolite was created as a gitosis replacement with far better features, debugging, and troubleshooting abilities."

I didn't turn up a more upstream reference to this claim, but I did notice similar things being mentioned elsewhere.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Resources for learning git?
« Reply #24 on: May 31, 2013, 02:49 AM »
The following seemed pretty decent:

  The Git Parable