Skip to contentSkip to conversation

Add git quick reference

RFC PATCH In review Jonas Fonseca 3 participants 4 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 Add git quick reference

It attempts to list some of the most commonly used commands, which should give new users an idea of how to get started.

Available both as a manpage (generated via a script) and HTML page.

---
 Documentation/Makefile            |    8 ++-
 Documentation/asciidoc.conf       |    2 +
 Documentation/git-quick-ref.sh    |   67 ++++++++++++++++++++++
 Documentation/quick-reference.txt |  112 +++++++++++++++++++++++++++++++++++++
 4 files changed, 187 insertions(+), 2 deletions(-)
 create mode 100755 Documentation/git-quick-ref.sh
 create mode 100644 Documentation/quick-reference.txt

This is "ported" from the Cogito quick reference that I made (inspired by svn-ref) to serve as something to hand out for new users--a kinda cheat sheet. I don't know if git even needs another document in this category. However, contrary to some of the others, this document tries to be very brief, which might help impatient users. ;)

Also, I am, myself, quite new to the git porcelain so any feedback on which commands should be included would be very much appreciated! I'd like to keep the format to 2 pages max, so there is still room for a few additions.

See the end result at:
http://jonas.nitro.dk/git/quick-reference.{html,pdf}

Documentation/Makefile +6 -2
index 3f92783..9dcabaf 100644
@@ -3,7 +3,7 @@ MAN1_TXT= \
 		$(wildcard git-*.txt)) \
 	gitk.txt
 MAN5_TXT=gitattributes.txt
-MAN7_TXT=git.txt
+MAN7_TXT=git.txt git-quick-ref.txt
 
 DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT))
 
@@ -18,6 +18,7 @@ ARTICLES += hooks
 ARTICLES += everyday
 ARTICLES += git-tools
 ARTICLES += glossary
+ARTICLES += quick-reference
 # with their own formatting rules.
 SP_ARTICLES = howto/revert-branch-rebase user-manual
 
@@ -107,7 +108,7 @@ git.7 git.html: git.txt core-intro.txt
 
 clean:
 	rm -f *.xml *.xml+ *.html *.html+ *.1 *.5 *.7 howto-index.txt howto/*.html doc.dep
-	rm -f $(cmds_txt) *.made
+	rm -f $(cmds_txt) *.made git-quick-ref.txt
 
 %.html : %.txt
 	rm -f $@+ $@
@@ -129,6 +130,9 @@ clean:
 user-manual.xml: user-manual.txt user-manual.conf
 	$(ASCIIDOC) -b docbook -d book $<
 
+git-quick-ref.txt: quick-reference.txt
+	./git-quick-ref.sh $< > $@
+
 XSLT = http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
 XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
 
Documentation/asciidoc.conf +2 -0
index fa7dc94..546a074 100644
@@ -12,6 +12,8 @@ caret=^
 startsb=&#91;
 endsb=&#93;
 tilde=&#126;
+# Five non breaking spaces used for option indentation in the quick reference
+qrefopt=&#160;&#160;&#160;&#160;&#160;
 
 ifdef::backend-docbook[]
 [gitlink-inlinemacro]
Documentation/git-quick-ref.sh new file +67 -0

67 lines not on this page · raw message

Documentation/quick-reference.txt new file +112 -0

112 lines not on this page · raw message

Signature · 4 lines
1.5.2.816.gc5560-dirty

-- 
Jonas Fonseca
#1 lore raw
Quoted 4 lines · Jonas Fonseca

It attempts to list some of the most commonly used commands, which should give new users an idea of how to get started.

Available both as a manpage (generated via a script) and HTML page.

We have a "git quick start" here:

http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#git-quick-start

and there's one on the wiki:

http://git.or.cz/gitwiki/QuickStart

I think the one in the manual tries to follow the organization of the manual more closely.

I haven't tried to compare those two recently, or to compare yours to either of them. If you could compare and suggest any improvements, that'd be helpful.

I like your name better ("quick reference" as opposed to "quick start").

Having it as a man page may be a good idea too. I'd like to keep a copy in the manual as well, though, so we'd have to include from some common file.

--b.

#2 lore raw

J. Bruce Fields <[email protected]> wrote Sun, Jun 03, 2007:

Quoted 8 lines · Jonas Fonseca
Quoted 4 lines

It attempts to list some of the most commonly used commands, which should give new users an idea of how to get started.

Available both as a manpage (generated via a script) and HTML page.

We have a "git quick start" here:

Quoted 8 lines

http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#git-quick-start

and there's one on the wiki:

http://git.or.cz/gitwiki/QuickStart

I think the one in the manual tries to follow the organization of the manual more closely.

I like the manual version best. However, it is not as "visually" clean and simple as I would like, but perhaps this sort of "use case" approach is better.

Quoted 3 lines

I haven't tried to compare those two recently, or to compare yours to either of them. If you could compare and suggest any improvements, that'd be helpful.

I will see what I can do when I get the time and courage. :)

Quoted 1 line

I like your name better ("quick reference" as opposed to "quick start").

Yes, "quick start" suggest (at least to me) that it is a tutorial and it seems far from that.

Quoted 3 lines

Having it as a man page may be a good idea too. I'd like to keep a copy in the manual as well, though, so we'd have to include from some common file.

The main idea was to have the reference in a printable format similar to svn-ref. But the man page was easy to do, although it might not be something that users would stumble upon.

Signature · 1 line
Jonas Fonseca
#3 lore raw
Quoted 26 lines · Jonas Fonseca

J. Bruce Fields <[email protected]> wrote Sun, Jun 03, 2007:

Quoted 8 lines · Jonas Fonseca
Quoted 4 lines

It attempts to list some of the most commonly used commands, which should give new users an idea of how to get started.

Available both as a manpage (generated via a script) and HTML page.

We have a "git quick start" here:

Quoted 8 lines

http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#git-quick-start

and there's one on the wiki:

http://git.or.cz/gitwiki/QuickStart

I think the one in the manual tries to follow the organization of the manual more closely.

I like the manual version best. However, it is not as "visually" clean and simple as I would like, but perhaps this sort of "use case" approach is better.

Quoted 3 lines

I haven't tried to compare those two recently, or to compare yours to either of them. If you could compare and suggest any improvements, that'd be helpful.

Quoted 6 lines

I will see what I can do when I get the time and courage. :)

Quoted 1 line

I like your name better ("quick reference" as opposed to "quick start").

Yes, "quick start" suggest (at least to me) that it is a tutorial and it seems far from that.

When I started the "everyday" document, I wanted to make it a cheat sheet usable by people who are not so familiar with the workflow. The "quick reference" would be good for people who want a cheat sheet without need for workflow description.