bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: git: avoiding merges, rebasing


From: Bruno Haible
Subject: Re: git: avoiding merges, rebasing
Date: Tue, 2 Oct 2007 03:47:43 +0200
User-agent: KMail/1.5.4

Hi,

>   $ git stash
>   $ git fetch
>   $ git rebase origin/master
>   $ git stash apply
>   <resolve conflicts>
>   $ git stash clear
>   $ git reset

Note that "git stash clear" is a dangerous command. I recommend to use it
only after "git stash list" and/or "git status".

I just did this:

    $ git stash
    $ git pull
    $ git stash apply
    $ git stash clean              ; typo!
    $ git stash clear              ; fatal correction to typo!

and lost 20 modified files. Well, not really lost. Just took me a while to
recover them by
  - looking for the most recently changed files in .git/objects/,
  - use "git cat-file blob xxxx" on each,
  - assign the blobs to file names.

Is there some shorthand for this process, such as a "git-recover" command?

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]