All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Kågedal" <davidk@lysator.liu.se>
To: git@vger.kernel.org
Subject: Re: Git Questions
Date: Mon, 20 Aug 2007 13:23:31 +0200	[thread overview]
Message-ID: <87bqd2bgb0.fsf@morpheus.local> (raw)
In-Reply-To: 1187603749.11595.10.camel@tom-desktop

Tom Schinckel <gunny01@gmail.com> writes:

> Hi all,
>
> I've just started using git to run a repository on my local machine. I'm
> wondering about the following questions:

You seem to have a very strange use case that you need to explain
better.

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

There are no "revision numbers" in git.  There is only content.  The
history of commits is created by having one commit point to its
"parent" commit.  And in git, everything is addressed by its content,
by using hashes.  So the long hash is a universal identifier for what
it refers to.  It is not a revision number in your repository, it is
something that can be used by someone else who hasn't even heard of yo
to refer to exactly the same thing.

So, no you can't change that.  But there might be something else that
you can do if you explain what you're actually after?

> Can I set up Git to:
>
> a) Automatically commit a file to the repository every time it's saved

Probably, but remember that git doesn't track individual files.  It
tracks the whole tree, so you would be creating a new revision of the
whole tree every time you saved that single file.  Which would not
create a very nice history if you are using git for something it
usually is used for (tracking source code etc).

> b) Automatically use the default hashed-out bit:
>
> 	# Please enter the commit message for your changes.
> 	# (Comment lines starting with '#' will not be included)
> 	# Updated but not checked in:
> 	#   (will commit)
> 	#
> 	#       modified:   TOK/bce.abw
> 	#
> 	# Untracked files:
> 	#   (use "git add" to add to commit)
> 	#
> 	#       TOK/bce.abw.bak~
>
> as the commit message? (i.e, remove the hash signs and not bring up vim
> in the first place?)

Why on earth would you want to do that?  That comment doesn't contain
any information about what change you committed?  The list of files
that were modified by the commit is already in git.

-- 
David Kågedal

  parent reply	other threads:[~2007-08-20 11:23 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
2007-08-20 11:23 ` David Kågedal [this message]
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=87bqd2bgb0.fsf@morpheus.local \
    --to=davidk@lysator.liu.se \
    --cc=git@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.