

Git Cheet Sheet - javinpaul
http://www.git-tower.com/blog/git-cheat-sheet/

======
hughdbrown
The "Test Code Before You Commit" rule suggests that the writer does not
distinguish between committing code and pushing code, between private changes
and public changes. When you commit changes locally, you can always rebase to
your heart's content before pushing.

I think this says it best: "Treat public history as immutable, atomic, and
easy to follow. Treat private history as disposable and malleable."
[https://sandofsky.com/blog/git-workflow.html](https://sandofsky.com/blog/git-
workflow.html)

~~~
jdludlow
"Test Code Before You Push" seems to be what they're trying to say.

------
Trufa
I maintain a very basic cheatsheet ([https://github.com/trufa/git-
cheatsheet](https://github.com/trufa/git-cheatsheet)) if anyone is interested,
I think it is a little bit more helpful since it links to relevant
explanations and has some clarifications beside the code.

I did it for myself (because I kept forgetting) so it's not very thorough, but
still a little more helpful if you ask me, it will get better with time and/or
collaboration (unlike an image!).

Note that the very basics are not included, those you tend to remember them
soon enough IMO.

If you're interested it's hosted on github and I would be very happy if anyone
want's to collaborate:

[https://github.com/trufa/git-cheatsheet](https://github.com/trufa/git-
cheatsheet)

~~~
ciupicri
Why don't you put a rendered version on a GitHub page[1]?

[1] [http://pages.github.com/](http://pages.github.com/)

~~~
Trufa
I hadn't done it because it's very home-made, but since it's effortless, it's
already done. Thanks for the suggestion!

[http://trufa.github.io/git-cheatsheet/](http://trufa.github.io/git-
cheatsheet/)

------
muloka
In case you don't want to download all three design variations in a zip file
you can download the one you want here:

* White [http://www.git-tower.com/files/cheatsheet/Git_Cheat_Sheet_wh...](http://www.git-tower.com/files/cheatsheet/Git_Cheat_Sheet_white.pdf)

* Grey [http://www.git-tower.com/files/cheatsheet/Git_Cheat_Sheet_gr...](http://www.git-tower.com/files/cheatsheet/Git_Cheat_Sheet_grey.pdf)

* Dark [http://www.git-tower.com/files/cheatsheet/Git_Cheat_Sheet_da...](http://www.git-tower.com/files/cheatsheet/Git_Cheat_Sheet_dark.pdf)

------
tmoertel
What font are they using for their cheat sheet? It appears to have its
apostrophe glyph turned upside down, which seems a rather odd thing for a font
designer to do.

EDIT: Actually, it looks like the font is fine and (for some reason) the
source document represents apostrophes with U+2018 (LEFT SINGLE QUOTATION
MARK) instead of U+2019 (RIGHT SINGLE QUOTATION MARK).

------
philbarr
"Version Control is not a backup system"

I think it is. In fact, when working on personal projects that's the ONLY
reason I use it.

I don't understand why Linus gets his knickers in a twist about the commit
message thing. Whilst I do try and keep my commit messages useful and not
blank, I can only think of three or four times in the last ten years where
I've actually had to go back through previous versions of code to try and
understand the current code. Why is it so important? Just look at the code you
have now and fix it!

~~~
ajross
> _I can only think of three or four times in the last ten years where I 've
> actually had to go back through previous versions of code_

Then, with all due respect, you work on some pretty trivial code and/or
throwaway projects without long lifetimes. No one who has ever faced a serious
regression in a large system would ever say something like this.

~~~
philbarr
I think you'll find I work on full scale enterprise systems with lifetimes of
4 years - 30 years. It's about _understanding_ the code you have now, and you
can do that by looking through it.

------
YoukaiCountry
This is going to be a nice thing to reference. I think I'll print it out. My
only complaint is that it doesn't cover the git stash commands. I'll just use
a good old fashioned pen to write my own section!

------
livingparadox
For the love of all that is spelling, will a mod change the title on here...
it should be "Cheat" not "Cheet"

------
leeoniya
the popularity of these cheat sheets every month is telling of git's
confusing, over-overloaded syntax :(

i keep hoping they make a clean break and just rework the commands to reduce
confusion and introduce better uniformity

~~~
monkmartinez
This. A million times, this.

------
Balgair
FINALLY! Thanks you javinpaul for posting this. I really needed it!

------
valbaca
git config alias.cheet cheat

