"You go to commit some code to a public repo. The maintainer scolds you for using merges instead of fast forwards."<p>"You decide to bring in some more code from the public repo. Here is a 6000 word essay on what rebase means."<p>"You try to look at an old version of the code. Suddenly you are in ‘detached HEAD’ state. The End."<p>I love git, but simple intros like this hide all the confusing complexity and awkward UI that quickly comes to the forefront when using git for everyday work.
This is perhaps too few words to elucidate git. I appreciate that Ms. Cook links to other articles on her own site that go into much greater detail. However, I still think the best self-contained and relatively brief explanation of Git is "The Git Parable."[1]<p>[1] <a href="http://tom.preston-werner.com/2009/05/19/the-git-parable.html" rel="nofollow">http://tom.preston-werner.com/2009/05/19/the-git-parable.htm...</a>
And here, perfectly illustrated, is a reminder why I don't like using some source code version control systems. I don't want to understand the precise implementation of my source code control system, and I don't personally believe that I should have to for effective use.<p>I realise this is likely an unpopular opinion, but I would challenge you to reply with justification rather than inevitably downvoting me into oblivion.<p>One of my software development mentors (a long time mechanical engineer who has done UNIX OS development for 20+ years) often has this as his email signature and I think it's rather apt in this context:<p><pre><code> Civilization advances by extending the number of
important operations which we can perform without
thinking about them.
</code></pre>
With that said, I'm not advocating complete ignorance of <i>how</i> a version control system "works", I just find the philosophy of "you must learn the internal data formats and workings of this system to use it effectively" more than a bit distasteful.
This is a cool essay! It's very approachable. I would really like to understand git under the hood one day, but I'm intimidated by how much it does with such a small memory footprint.<p>My group project partner and I were having the toughest time with git last night. I thought we were all ready to walk out the door and then we ended up monkeying around with it for an hour and a half.<p>The atlassian visual guides really helped:<p><a href="https://www.atlassian.com/git/tutorials/" rel="nofollow">https://www.atlassian.com/git/tutorials/</a><p>They're great for people who know the names of all the git commands but who are still thrown off in really basic situations, ie 'Is it merge master? Merge origin master? Merge origin/master? Why does it say already-up-to-date?'
What git needs is a simple undo command, as in<p><pre><code> git undo
</code></pre>
and it just undoes whatever you just did. There seems to be a way to undo pretty much anything, but I usually end up googling and deciphering the likes of<p><pre><code> git reset HEAD hard -f --now origin/master --no-rebase %${%&`+'${`%&NO CARRIER")
</code></pre>
Then when that goes wrong, you're in real trouble and left scratching your head at git's error message.
There is some subset of all VCS software that contains the handful of commands that 80% of coders need 80% of the time. Conceptually, these commands are very nearly isomorphic for individuals making changes to files by themselves.<p>These paragraphs do indeed cover those commands for git, although I can't see why this presentation is particularly useful, even for a beginner. It's just a condensed HOWTO that doesn't actually explain what it's doing.<p>Newcomers would be better advised to sacrifice the 30 minutes and read the first three chapters of the storied git book: <a href="http://git-scm.com/book/en/v2" rel="nofollow">http://git-scm.com/book/en/v2</a>.
I'm an SVN user, and I'll have to move to git some day, but it's not winning any points for me :-( . I got bit by it recently. I had cloned a repo, and then a few weeks later, did<p><pre><code> % git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
</code></pre>
I assumed the working copy was up-to-date, as git states.... but alas, no. I had to do a "git pull" to get the latest changes. Why doesn't git tell you that your copy is out of date?
Fast-forward 5 years into using Git, I learned that <i>git add</i> and <i>git commit</i> is all you need to know to get started. I learned everything else, on the job and by need.<p>- <i>git push</i> when I needed to take work to Github<p>- <i>git checkout</i> when I needed to move between branches<p>- <i>git merge</i> when I needed to merge someone else work into master<p>- <i>git cherry-pick</i> I needed this to take commits from a non-fork to my project<p>- <i>git bissect</i> Debugging a bug introduced between releases<p>I also learned to use Github tools, SourceTree, the Command-Line and Bitbucket. If you want to learn git, just make a commit. Everything else will be mastered down the road.
For me, the hardest thing about learning Git is the lurking feeling that I have to learn it because it has become an unavoidable fad, not because it is the best approach to version management for most common use-cases.
The page is just pure white for about 30 seconds before it loads for me. (Gentoo Firefox on Linux.) I don't know why but all the items on the page are positioned off page with "visibility: hidden".<p>Anyway, in case the author sees I thought they might want to know. And if it doesn't load for someone here, wait 30 seconds and it probably will.<p>I can see in the console your fonts are failing to load. Perhaps this is causing the issue?
<a href="http://www.sbf5.com/~cduan/technical/git/" rel="nofollow">http://www.sbf5.com/~cduan/technical/git/</a><p>"The conclusion I draw from this is that you can only really use Git if you understand how Git works. Merely memorizing which commands you should run at what times will work in the short run, but it’s only a matter of time before you get stuck or, worse, break something."
This might be useful for someone who is managing a personal project on Github.<p>Add a couple of additional developers with 600 words of git understanding would result in chaos.
I see a blank page.<p>Is this a joke I don't get?<p>edit: <a href="https://i.imgur.com/TQxyQES.png" rel="nofollow">https://i.imgur.com/TQxyQES.png</a>
Anyone know of a point and click graphical tool for git? I've seen the branches and merges from the console but if I simply want to take git to a specific commit hash, it can easily devolve into hours of research.<p>I believe the problem here is that even though there are only a finite number of choices (less than a dozen in everyday life) representing what I want to accomplish, there are countless ways of getting there with commands. I just don't remember having these kinds of problems with svn, so I think the difficulty is not conceptual, but due to a poor mapping between the concepts and the interface.<p>I'm thinking something like Apple's Time Machine, where you click a commit and the repo shows up on the desktop as a mounted drive. We could use ordinary tools to edit the image and when it's unmounted it becomes a new commit (or something along those lines).
I remember seeing this posted on HN a few months back.<p>Here's the link: <a href="https://news.ycombinator.com/item?id=8932737" rel="nofollow">https://news.ycombinator.com/item?id=8932737</a> (see the comments for the correct link..)<p>I remember liking reading it.
I've definitely found git confusing to understand. I've had to write myself a tutorial to get my head around the concepts and day-to-day workflow:<p><a href="http://freetexthost.com/pe020d1b41" rel="nofollow">http://freetexthost.com/pe020d1b41</a>
"It points the master branch on beta at the commit object that the master branch points at on the alpha repository."<p>Yes, as clear as mud. This is why I hate git. Why should code versioning be SO bloody complicated?!. Give me SVN or (<i>shudder</i>) CVS anyday.
Correct me if I'm wrong, but the first couple of sentences seems wrong. Git can only be initiated in an empty directory.<p>Other than that: This is a very short and concise introduction, especially the merging.