All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nico -telmich- Schottelius <nico-linux-git@schottelius.org>
To: git@vger.kernel.org
Subject: Problem getting older version
Date: Wed, 19 Oct 2005 10:00:46 +0200	[thread overview]
Message-ID: <20051019080046.GI22986@schottelius.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]

Hello!

The following situation:

- The last commit was a merge, mhich broke some files
- We want three files from the commit before

Now I was told to do the following:

1. get the sha1hash from the commit before (cg-log did that)
2. get the sha1hash from the file in that tree:
[9:27] srsyg01:walderlift% git-ls-tree 35ff687efc1b19b4db918e5af859894a9dc916e4 Code/lw1/Client/MainForm.xfm 
100644 blob 605958b1435f6bdbd5cc502ae3a4c1a281d01f0a    Code/lw1/Client/MainForm.xfm

3. cat the file with git-cat-file
[9:36] srsyg01:walderlift% git-cat-file blob 605958b1435f6bdbd5cc502ae3a4c1a281d01f0a | less

4. Now overwrite it
[9:38] srsyg01:walderlift% git-cat-file blob 605958b1435f6bdbd5cc502ae3a4c1a281d01f0a > Code/lw1/Client/MainForm.xfm 

5. Goto 2 and repeat two times

Is this really the standard way to recover a file? As a developer / end user I would expect that:

cg-recover <filename> <commit id> and -f for overwriting the file if it exists

Did I overlook something or is it currently really this complicated? And it is
very error prone, if I have to overwrite the files using '>'-redirection (perhaps I mistype the
filename).

Nico

-- 
Latest project: cconfig (http://nico.schotteli.us/papers/linux/cconfig/)
Open Source nutures open minds and free, creative developers.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

             reply	other threads:[~2005-10-19  8:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-19  8:00 Nico -telmich- Schottelius [this message]
2005-10-19  8:26 ` Problem getting older version Junio C Hamano
2005-10-20  1:42 ` Petr Baudis
2005-10-24  5:23   ` Nico -telmich- Schottelius

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=20051019080046.GI22986@schottelius.org \
    --to=nico-linux-git@schottelius.org \
    --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.