All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: Oliver Kullmann <O.Kullmann@swansea.ac.uk>
Cc: git@vger.kernel.org
Subject: Re: how to move with history?
Date: Mon, 18 Jun 2007 21:49:07 +0200	[thread overview]
Message-ID: <20070618194907.GA12445@steel.home> (raw)
In-Reply-To: <20070618191607.GK3037@cs-wsok.swansea.ac.uk>

Oliver Kullmann, Mon, Jun 18, 2007 21:16:07 +0200:
> 2. I issue "git mv file new_file".
> 
> 3. Then I have to commit the renaming.  I can't find anything on how
> to do this (neither in the git-mv- nor in the git-commit-documentation).

Just git-commit. git-mv is only so you don't have to run git add on
the new file name and don't need to run "git-commit -a" afterwords.

> So a hack is to use "git commit -a".  Apparently this works.

Even a plain "mv file new_file; git add new_file" would have worked.

> 4. Now I have "new_file" in the repository, but without history
> (except of the renaming operation),

It does. Try "git log file new_file". After committing, that is

> and I have still "file" in this history, but I can no longer get
> access to the history of "file" via "gitk file" ?

Well, you didn't commit the change yet.

> This looks a bit strange to me (the renamed file has
> no history, the old file still lurking around, but not
> easily accessible).

Git does not keep "renaming history". It does not have to, as it keeps
how your project looked at each commit (point in history).

  reply	other threads:[~2007-06-18 19:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-18 19:16 how to move with history? Oliver Kullmann
2007-06-18 19:49 ` Alex Riesen [this message]
2007-06-18 20:29   ` Oliver Kullmann
2007-06-18 20:31     ` J. Bruce Fields
2007-06-18 20:36       ` Frank Lichtenheld
2007-06-18 20:43     ` Robin Rosenberg
2007-06-18 21:07     ` Alex Riesen
2007-06-19 19:28       ` Oliver Kullmann
2007-06-19 22:59         ` Jakub Narebski

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=20070618194907.GA12445@steel.home \
    --to=raa.lkml@gmail.com \
    --cc=O.Kullmann@swansea.ac.uk \
    --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.