git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Tom Schinckel <gunny01@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git Questions
Date: Mon, 20 Aug 2007 06:06:00 -0400	[thread overview]
Message-ID: <20070820100600.GA26843@coredump.intra.peff.net> (raw)
In-Reply-To: <1187603749.11595.10.camel@tom-desktop>

On Mon, Aug 20, 2007 at 07:25:48PM +0930, Tom Schinckel wrote:

> Is it possible to change the revision numbers from long hashes to normal
> numbers (i.e, 0001 for first, 0002 for the second)

No, they are a fundamental part of the way git works. However, there are
a few ways you can avoid using the hashes:

 - tag your commits with readable names
 - use git's syntax for relative commits (e.g., "git-show HEAD~20") will
   show you 20 commits back from the current commit (where back is
   defined by following the first parent of each commit)

> a) Automatically commit a file to the repository every time it's saved

If you want git to notice when files are changed and commit them, then
no. You can probably configure your editor (or whatever is saving the
file) to trigger a 'git-add && git-commit'. But keep in mind this will
produce a lot of commits with lousy commit messages.

> b) Automatically use the default hashed-out bit:

There isn't an argument to git-commit to do this, but you can get the
same message from git-status. So you could do something like:

git-status | sed 's/^# //' | git-commit -F -

-Peff

  reply	other threads:[~2007-08-20 10:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20  9:55 Git Questions Tom Schinckel
2007-08-20 10:06 ` Jeff King [this message]
2007-08-20 11:23 ` David Kågedal
2007-08-20 12:15   ` Tom Schinckel
2007-08-20 12:46     ` Andy Parkins
2007-08-20 12:59       ` David Tweed
2007-08-20 18:35         ` Jan Hudec
2007-08-20 12:53     ` Matthieu Moy
2007-08-20 13:06       ` David Tweed

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=20070820100600.GA26843@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gunny01@gmail.com \
    /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).