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 Cheatsheet

225 pointsby jcklnrunsover 11 years ago

18 comments

gum_ina_packageover 11 years ago
Is anyone else getting tired of seeing all these "git tips", "cheatsheets", and "helpers" on here? While these all may look cool and be flashy, I've never used a single one that's showed up on the front page. Personally, I find the man pages + Google to be good enough. Then again, maybe I'm a curmudgeon.
评论 #6697762 未加载
评论 #6696456 未加载
评论 #6699284 未加载
评论 #6698857 未加载
chewxyover 11 years ago
Wow, this is actually good use of visualization. I clicked through expecting a one pager. Instead, I got an interactive cheatsheet showing how the commands interact across different repos, indices, and workspaces.
评论 #6697053 未加载
Trufaover 11 years ago
A plug to my cheatsheet, it is just a repo in github: <a href="https://github.com/trufa/git-cheatsheet" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;trufa&#x2F;git-cheatsheet</a><p>I try to link to the relevant StackOverflow explanation-<p>I&#x27;m adding new stuff every now and then. This weekend I&#x27;ll organize it and add some obvious stuff that is missing and publish it to HN.<p>I honestly find it more useful that most of the cheat sheets, specially those images with a couple of commands written on it.<p>Please feel free to collaborate pull requests and or issues are greatly appreciated.
sdfjklover 11 years ago
I just gave up and use SourceTree. I don&#x27;t like git&#x27;s syntax at all, but have to work with it, so a nice GUI works best for me. Maybe I&#x27;m getting old, or maybe I just prefer a better designed command line interface (for my personal projects I&#x27;m using Fossil and am quite happy with the command line there.)
评论 #6697438 未加载
评论 #6697829 未加载
评论 #6699674 未加载
评论 #6696964 未加载
评论 #6698672 未加载
Flimmover 11 years ago
Please don&#x27;t break my back button.
评论 #6698167 未加载
lmmover 11 years ago
My awkward git use case: while working on a branch, I frequently want to merge changes from the (upstream, remote) master into my branch. Is there a faster way to do this than switch to master, pull, switch back, merge master?
评论 #6695983 未加载
评论 #6696338 未加载
andrelaszloover 11 years ago
<a href="https://github.com/ndp/git-cheatsheet" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ndp&#x2F;git-cheatsheet</a><p>Site seems down. Just clone this repo and open git-cheatsheet.html in your browser.
评论 #6696039 未加载
rjzzleepover 11 years ago
I once again want to remind people of tig[1]. While there are plugins like gitv that do similar things, i prefer tig.<p>You can set custom hotkeys in your tigrc (which are context sensitive). For example:<p><pre><code> bind generic F !git fetch bind main ! !git revert %(commit) bind main c !git checkout %(commit) </code></pre> [1]<a href="http://jonas.nitro.dk/tig/" rel="nofollow">http:&#x2F;&#x2F;jonas.nitro.dk&#x2F;tig&#x2F;</a>
评论 #6699711 未加载
d_theoristover 11 years ago
I really like this because it shows the different &#x27;places&#x27; things happen in Git arranged spatially, and groups commands into those spaces. This really helps with building mental model of how things work.<p>The visualization is great and a lot of fun but I would also like to have a non-interactive version for quick paper-based reference.
daddykotexover 11 years ago
Very good work here, it is interesting to think of it in a visual way.
dgregdover 11 years ago
Great visualization. It actually shows how messy is git command line interface. Just looking at a cmd syntax it is hard to guess if the cmd refers to workspace, index or local repository.
评论 #6696274 未加载
austenallredover 11 years ago
I wish I didn&#x27;t have to click on each topic to see it, but as someone just learning to program this is extremely valuable.
mmabbqover 11 years ago
This is pretty neat, but I find it pretty annoying that my eyes have to keep shifting up and down to read the explanation for each command. It would be nice if the explanation text popped up closer to where my eyes are already focused.
nakovetover 11 years ago
It&#x27;s missing the staging area, but it looks good and well done.
评论 #6696042 未加载
评论 #6696044 未加载
yeukhonover 11 years ago
Nice visualization idea but the color is burning my eyes... and to be honest the best cheatsheet is a table format. Easier to search and navigate.
mbairdover 11 years ago
<a href="http://3d247fe.5minfork.com/git-cheatsheet.html" rel="nofollow">http:&#x2F;&#x2F;3d247fe.5minfork.com&#x2F;git-cheatsheet.html</a>
jhdevosover 11 years ago
Small fun bug: if you click twice on an item, the description at the bottom shows &#x27;git null&#x27; :)
pjmoover 11 years ago
Awesome, thanks!