TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Git in six hundred words

286 pointsby monsterixabout 10 years ago

25 comments

NelsonMinarabout 10 years ago
&quot;You go to commit some code to a public repo. The maintainer scolds you for using merges instead of fast forwards.&quot;<p>&quot;You decide to bring in some more code from the public repo. Here is a 6000 word essay on what rebase means.&quot;<p>&quot;You try to look at an old version of the code. Suddenly you are in ‘detached HEAD’ state. The End.&quot;<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.
评论 #9520775 未加载
评论 #9520873 未加载
评论 #9520682 未加载
评论 #9520816 未加载
评论 #9521948 未加载
评论 #9520817 未加载
评论 #9520768 未加载
评论 #9520772 未加载
评论 #9520747 未加载
js2about 10 years ago
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 &quot;The Git Parable.&quot;[1]<p>[1] <a href="http:&#x2F;&#x2F;tom.preston-werner.com&#x2F;2009&#x2F;05&#x2F;19&#x2F;the-git-parable.html" rel="nofollow">http:&#x2F;&#x2F;tom.preston-werner.com&#x2F;2009&#x2F;05&#x2F;19&#x2F;the-git-parable.htm...</a>
评论 #9520952 未加载
评论 #9520834 未加载
binarycrusaderabout 10 years ago
And here, perfectly illustrated, is a reminder why I don&#x27;t like using some source code version control systems. I don&#x27;t want to understand the precise implementation of my source code control system, and I don&#x27;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&#x27;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&#x27;m not advocating complete ignorance of <i>how</i> a version control system &quot;works&quot;, I just find the philosophy of &quot;you must learn the internal data formats and workings of this system to use it effectively&quot; more than a bit distasteful.
评论 #9521776 未加载
评论 #9521693 未加载
评论 #9528160 未加载
评论 #9522275 未加载
评论 #9522415 未加载
bgilroy26about 10 years ago
This is a cool essay! It&#x27;s very approachable. I would really like to understand git under the hood one day, but I&#x27;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:&#x2F;&#x2F;www.atlassian.com&#x2F;git&#x2F;tutorials&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.atlassian.com&#x2F;git&#x2F;tutorials&#x2F;</a><p>They&#x27;re great for people who know the names of all the git commands but who are still thrown off in really basic situations, ie &#x27;Is it merge master? Merge origin master? Merge origin&#x2F;master? Why does it say already-up-to-date?&#x27;
评论 #9520486 未加载
iconjackabout 10 years ago
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&#x2F;master --no-rebase %${%&amp;`+&#x27;${`%&amp;NO CARRIER&quot;) </code></pre> Then when that goes wrong, you&#x27;re in real trouble and left scratching your head at git&#x27;s error message.
评论 #9522100 未加载
jordanpgabout 10 years ago
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&#x27;t see why this presentation is particularly useful, even for a beginner. It&#x27;s just a condensed HOWTO that doesn&#x27;t actually explain what it&#x27;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:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2" rel="nofollow">http:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2</a>.
评论 #9520538 未加载
评论 #9520674 未加载
评论 #9520920 未加载
ajaysabout 10 years ago
I&#x27;m an SVN user, and I&#x27;ll have to move to git some day, but it&#x27;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 &#x27;origin&#x2F;master&#x27;. 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 &quot;git pull&quot; to get the latest changes. Why doesn&#x27;t git tell you that your copy is out of date?
评论 #9520519 未加载
评论 #9520498 未加载
评论 #9520885 未加载
评论 #9520776 未加载
评论 #9520671 未加载
评论 #9520502 未加载
评论 #9520801 未加载
评论 #9520756 未加载
csomarabout 10 years ago
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.
msamwaldabout 10 years ago
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.
评论 #9521109 未加载
Ellipsis753about 10 years ago
The page is just pure white for about 30 seconds before it loads for me. (Gentoo Firefox on Linux.) I don&#x27;t know why but all the items on the page are positioned off page with &quot;visibility: hidden&quot;.<p>Anyway, in case the author sees I thought they might want to know. And if it doesn&#x27;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?
Cyberisabout 10 years ago
That was a completely confusing entry. If I didn&#x27;t already have a pretty good handle on git, I would be hopelessly confused.
chxabout 10 years ago
<a href="http:&#x2F;&#x2F;www.sbf5.com&#x2F;~cduan&#x2F;technical&#x2F;git&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.sbf5.com&#x2F;~cduan&#x2F;technical&#x2F;git&#x2F;</a><p>&quot;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.&quot;
stevewilhelmabout 10 years ago
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.
shocksabout 10 years ago
I see a blank page.<p>Is this a joke I don&#x27;t get?<p>edit: <a href="https:&#x2F;&#x2F;i.imgur.com&#x2F;TQxyQES.png" rel="nofollow">https:&#x2F;&#x2F;i.imgur.com&#x2F;TQxyQES.png</a>
评论 #9520976 未加载
DougBTXabout 10 years ago
Git in six words: content addressable filesystem with linked revisions.
zackmorrisabout 10 years ago
Anyone know of a point and click graphical tool for git? I&#x27;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&#x27;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&#x27;m thinking something like Apple&#x27;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&#x27;s unmounted it becomes a new commit (or something along those lines).
评论 #9521000 未加载
评论 #9521083 未加载
评论 #9534954 未加载
评论 #9521778 未加载
paulvsabout 10 years ago
I remember seeing this posted on HN a few months back.<p>Here&#x27;s the link: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8932737" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8932737</a> (see the comments for the correct link..)<p>I remember liking reading it.
mjrpesabout 10 years ago
I&#x27;ve definitely found git confusing to understand. I&#x27;ve had to write myself a tutorial to get my head around the concepts and day-to-day workflow:<p><a href="http:&#x2F;&#x2F;freetexthost.com&#x2F;pe020d1b41" rel="nofollow">http:&#x2F;&#x2F;freetexthost.com&#x2F;pe020d1b41</a>
morpheousabout 10 years ago
&quot;It points the master branch on beta at the commit object that the master branch points at on the alpha repository.&quot;<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.
michaelmcmillanabout 10 years ago
Correct me if I&#x27;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.
评论 #9520573 未加载
dsjoergabout 10 years ago
i&#x27;m just waiting for git to flame out
评论 #9529820 未加载
morpheousabout 10 years ago
<a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=UllNDRXR1vM" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=UllNDRXR1vM</a>
tttyabout 10 years ago
almost git internals
unclesaammabout 10 years ago
FWIW, the syntax highlighting is a little overwhelming for me.
WorldWideWayneabout 10 years ago
I am looking forward to a time when memorizing commands seems archaic.
评论 #9520908 未加载
评论 #9522945 未加载