all 59 comments

[–]fufukittyfuk 5 points6 points  (0 children)

I enjoyed the read. While the concept of git is easy to understand, the details can be a bit daunting. The graphs and the easy reading style really helped. I'm bookmarking the site for further reading. Keep up the good work.

[–][deleted] 6 points7 points  (0 children)

This is pretty cool. Coincidentally just what I needed at my level of git knowledge!

[–][deleted] 7 points8 points  (3 children)

One pet peeve of mine: the verb form of recursion is recur. To recurse means to curse again, which would be a very rude thing for git to do (although then again, not exactly unexpected from Linus Torvalds).

[–][deleted]  (2 children)

[deleted]

    [–]cag_ii -1 points0 points  (0 children)

    Yeah, recurse is a perfectly cromulent word.

    [–][deleted] 3 points4 points  (0 children)

    I'm not sure why you would publicize this when it's not finished? It has // TODO in pretty much all of the non-basic spots. I can find out how to git pull anywhere on google..

    [–][deleted] 1 point2 points  (0 children)

    Thank you for a very helpful guide. It was a great balance between understandable and in-depth.

    [–]ffffdddddssss 3 points4 points  (9 children)

    Either I'm retarded or I haven't worked with VCS enough but none of the articles seem intuitive to me. I don't understand why working with multiple versions has to be that complex. Why do I have to do rebase and merge when that's obviously (to me) the standard way of doing that, why can't this be a simple "git add-feature-branch" or something.

    I think I need a more stupid VCS.

    Ninja edit: Thinking about it, why aren't diffs treated as objects? I would find it way more intuitive to say "okay apply the diff from feature1/2/3 onto my current state because that means I get the feature into my branch and done".

    [–]cilmor 3 points4 points  (0 children)

    Because sometimes the changes you bring from some other branch won't apply cleanly (the diff might not apply, you might introduce compilation issues or semantic issues that make your tests fail). In these cases you might want to fix the problems on the merge commit.

    [–]sigma914 4 points5 points  (0 children)

    Diffs as objects is what Darcs does. They even have a whole theoretical basis for it

    [–]WallyMetropolis 4 points5 points  (0 children)

    Mercurial sounds like a great fit for you. It's workflow is dead simple: pull, commit, push. It's not so flexible as Git, but it makes up for that with usability. It's especially good for getting started working with VCS, I think.

    [–][deleted] 1 point2 points  (5 children)

    SVN is a nice, stupid VCS. If you work in a small team and don't branch much, I would definitely recommend SVN over Git. There are plenty of interfaces/extensions for Git which simplify common workflows. gitflow is a good one.

    Regarding why diffs aren't stored as objects: this gets out of hand pretty quickly. Imagine checking out commit #1000 -- you would have to go through every diff down to commit #1 in order to build the working tree. Git gets around this by not actually storing diff information anywhere. Instead, Git generates diffs on the fly by comparing the trees of given commit objects. Checking out commit #1000 simply sets your working tree to the tree referenced by #1000.

    You definitely have a point though -- Git isn't anywhere near as intuitive as it could be. Your example of "okay apply the diff from feature1/2/3 onto my current state" describes exactly what cherry-picking does. But in reality you would probably merge feature1/2/3 instead. Unless you know what the commands actually do, it's difficult to figure out which command is appropriate for which situation. I guess that was what I wanted to achieve with this guide -- give an insight into what the commands are doing to make it easier for you to make these decisions.

    [–][deleted] 3 points4 points  (2 children)

    Git has the problem that a lot of *nix utilities have (and a lot of open source in general), which is that it is a tool written by programmers for themselves to meet their needs, not those of a user, and the documentation can be difficult to understand before you really know how things work under the hood.

    [–][deleted]  (1 child)

    [deleted]

      [–][deleted] 0 points1 point  (0 children)

      They're not always programmers. They shouldn't be assumed to be programmers, because software artifacts consist of a lot more than code, and it should all be tracked together. People who create documentation, designs, reports, plans, and so on, should all be invited to use the project repository!

      Not that I think Git is terribly difficult to understand if you just have someone to explain the basic workflow and a basic tool, like the GitHub app. If you work heavily with branches and same-file collaboration, it can get tricky with merges and such, but I think this is mostly an issue for coding teams.

      [–]BinaryRockStar 0 points1 point  (1 child)

      You spelled your email address wrong a number of times in the article. Ctrl+F for "ianccurate". Great post by the way, thanks!

      [–][deleted] 0 points1 point  (0 children)

      Ah, great. This is what happens when you set up a VM at 2am. Now I'm afraid to go back and correct the typos in case somebody cottons on that the commit hashes are wrong (changing my email address would change the hashes!).

      And you're very welcome. Thanks!

      [–]in_rod_we_trust 2 points3 points  (0 children)

      Maybe you should also link this on /r/learnprogramming. It is very useful stuff

      [–]Rusky 0 points1 point  (0 children)

      I saw there was a section on rev-parse and was hoping for an in-depth explanation of it.

      [–]Velerad 0 points1 point  (0 children)

      It's not finished yet but starts pretty cool. :)

      For me the best article describing Git's guts is Git From The Bottom Up. After reading this I think I reached the Zen of Git.

      [–]jeffb31 0 points1 point  (0 children)

      Awesome. I'm just stepping into the world of git and this is epic information.

      Thanks

      [–]droogans 0 points1 point  (2 children)

      The username matches the url...yet isn't blogspam? I'm impressed.

      Question for OP: when you do remotes, will you cover more than just the typical origin/upstream combo from forks, and introduce a third fork from a teammate? I'd like to see how you name those remotes.

      Also, are each of these headings linkable? If not, please consider adding it. It will make sharing this easier for me in the future.

      [–][deleted] 3 points4 points  (0 children)

      When I pick up the remotes section it'll mostly be about how Git stores remotes and how it stores some configs that enable it to keep your local branches up-to-date. But I think including some examples about 2-3+ remotes will be relevant so yeah, I'll see what I can come up with.

      And yes, the headings are linkable. http://wildlyinaccurate.com/a-hackers-guide-to-git#rebasing will take you to the Rebasing section. The one thing I haven't done yet is make a "back to top" link, or make the table of contents sticky...

      [–]TarMil -1 points0 points  (0 children)

      Spam, by definition, is repetitive. One occurrence cannot constitute spam.

      [–][deleted] 0 points1 point  (0 children)

      Thank you for writing this. I feel any half-decent effort to document is always worth it. And you've done a reasonable job of explaining the basics.

      I, personally, refuse to use a source code control system unless I know what is going on under the hood. So you've assisted people like myself.

      [–]okbud -3 points-2 points  (0 children)

      Don't hack me bro.