From: Junio C Hamano <gitster@pobox.com>
To: Zack Rusin <zack@kde.org>
Cc: git@vger.kernel.org
Subject: Re: Git cheat sheet
Date: Wed, 29 Aug 2007 01:11:07 -0700 [thread overview]
Message-ID: <7vfy22squc.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <200708290348.02853.zack@kde.org> (Zack Rusin's message of "Wed, 29 Aug 2007 03:48:02 -0400")
Zack Rusin <zack@kde.org> writes:
> http://ktown.kde.org/~zrusin/git/git-cheat-sheet.svg
Nice drawing and no typo. Very nicely done.
Some minor nits (-), improvement suggestions (+), and
corrections (*).
- Recommended form for diff between 1 and 2 is "git diff $id1
$id2", not dotted form "$id1..$id2"
+ "git log -p $file" gives a false impression that it is about a
single file. Better written as "git log -p $file $dir/ec/tory/"
to suggest both usage.
- Although they do the same thing ("annotate" is there only for
backward compatibility) "git blame" is recommended over "git
annotate", if only because that's the command name more often
talked about in the community. If you are going to list only
one, blame is the name to keep.
+ To start from a particular revision, use "git blame $version $file".
- "git reset --hard HEAD"; you do not have to write HEAD there.
- "Revert" has a specific meaning to git but people from
different background interpret the word differently. Both
"git revert HEAD" and "git revert $id" are about creating a
new commit to reverse the effect of the named commit.
* "git pull $branch1 $branch2" is wrong. If you are merging
branch1 into branch2, you need to be on branch2 (i.e. have
done "git checkout branch2") and then say "git merge branch1".
+ "git commit" is not about publishing at all. A major point
about distributed SCMs is that unlike centralized systems, the
act of committing is separate from the act of publishing.
IOW, you can make commits without having to worry about
publishing that to the public, and that allows you to more
freely experiment.
+ A new section "Making Progress" and include commit, merge and
rebase there, perhaps?
next prev parent reply other threads:[~2007-08-29 8:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-29 7:48 Git cheat sheet Zack Rusin
2007-08-29 7:46 ` Rene Herman
2007-08-29 8:11 ` Junio C Hamano [this message]
2007-08-29 8:32 ` Matthieu Moy
2007-08-29 10:04 ` Karl Hasselström
2007-08-29 12:55 ` Zack Rusin
2007-08-29 13:47 ` Dan Chokola
2007-08-29 16:14 ` Matthieu Moy
2007-08-29 23:37 ` Bernt Hansen
2007-08-30 4:05 ` Bernt Hansen
2007-08-29 9:34 ` Nguyen Thai Ngoc Duy
2007-08-30 23:49 ` Dan Zwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vfy22squc.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=zack@kde.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).