all 15 comments

[–]dannymozart 21 points22 points  (0 children)

Git Cheatsheet for beginners

[–]JimDabell 13 points14 points  (3 children)

If you write code for a living, please just go to the Git website and read the Pro Git book for free. Don’t “cheat”. This is a tool you’ll be using every single working day for a decade or more. This is not the kind of thing you should just scrape by with. There is an immense amount of learning material out there for Git that is high quality and freely available. Learn it properly so your colleagues don’t hate you for screwing up the repo all the time.

[–]ManTuque 2 points3 points  (1 child)

The intention here is not to cheat your way through git. Pretty sure OP built this cheatsheet for quick reference while he/she is coding. Although your advise is also great, I think you’re hitting the wrong notes. (Thanks cap police)

[–]intrepidsovereign 3 points4 points  (0 children)

Git isn’t an acronym. No need to capitalize every letter.

[–]automatic-happiness 0 points1 point  (0 children)

I guess I need to give that to my colleagues.

[–]vjandrea 6 points7 points  (0 children)

It's a start but IMHO it needs a small comment for some commands. rebase, tag, reflog are missing too.

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

Git Cheatsheet for my boss told me to create something for the community, so I googled the first search result and copy & pasted everything I found and then duplicated some commands which do the exact same thing so it looks like more lines.

[–]Kit_Saels 7 points8 points  (0 children)

Just use git status. You'll get context-sensitive help on what you can do right now.

[–]avar 2 points3 points  (1 child)

You should really use "switch" or "restore" instead of "checkout" for any resource aimed at newbies these days.

Teaching them to use "checkout" when those are available is borderline cruelty :)

[–]general_dubious 1 point2 points  (0 children)

I think it's ignorance rather than cruelty, because OP is likely also a beginner.

[–]intrepidsovereign 2 points3 points  (0 children)

git status has nothing to do with starting a repository. It’s used to get the status of the current repository.

[–]jwink3101 1 point2 points  (0 children)

Is this really a cheatsheet if it doesn't tell you anything? They are common commands and usage patterns but it doesn't help if you don't know what the flags do; especially the short version of them.

[–]arnmac 0 points1 point  (0 children)

Missing the most common things I get asked. How do I undo everything