All of lore.kernel.org
 help / color / mirror / Atom feed
* StGIT discards local commits on "stg pull"
@ 2007-02-12  7:26 Pavel Roskin
  2007-02-12  9:31 ` Catalin Marinas
  0 siblings, 1 reply; 12+ messages in thread
From: Pavel Roskin @ 2007-02-12  7:26 UTC (permalink / raw)
  To: git; +Cc: Yann Dirson, Catalin Marinas

Hello!

I have been bitten by a strange bug/feature of StGIT, and it looks like it's not
only counterintuitive, but also inconsistent with git.

I have a repository available over ssh and I push to it from several places.  
Sometimes I make a commit and forget to push it.  Then I run "stg pull" to make
sure my repository is up to date.

The result is that the repository is rebased back to the last remote commit. 
It's very easy to miss.  There is no warning.  Everything looks just like an
update from the remote.

The example below shows that git-pull keeps my commit, but "stg pull" discards
it by rebasing back to the remote ID.

My .gitconfig doesn't override "stg pull" behavior; it merely sets my name and
mail aliases.

[proski@dl stgit-test]$ stg id
ebc429e7b7e596a12e8255fadc397123893cec73
[proski@dl stgit-test]$ echo "test change" >README
[proski@dl stgit-test]$ git-commit -m "test commit" README
Created commit 468861a2a1530f3bf98108e69632b3059e4ca0ce
 1 files changed, 1 insertions(+), 14 deletions(-)
[proski@dl stgit-test]$ git-pull
Fetching refs/heads/master from http://homepage.ntlworld.com/cmarinas/stgit.git
using http
Fetching refs/heads/stable from http://homepage.ntlworld.com/cmarinas/stgit.git
using http
Already up-to-date.
[proski@dl stgit-test]$ stg id
468861a2a1530f3bf98108e69632b3059e4ca0ce
[proski@dl stgit-test]$ stg pull
Checking for changes in the working directory... done
Pulling from "origin"...
Fetching refs/heads/master from http://homepage.ntlworld.com/cmarinas/stgit.git
using http
Fetching refs/heads/stable from http://homepage.ntlworld.com/cmarinas/stgit.git
using http
rebasing to "ebc429e7b7e596a12e8255fadc397123893cec73"...
done
No patches applied
[proski@dl stgit-test]$ stg id
ebc429e7b7e596a12e8255fadc397123893cec73
[proski@dl stgit-test]$

--
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-02-20 18:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12  7:26 StGIT discards local commits on "stg pull" Pavel Roskin
2007-02-12  9:31 ` Catalin Marinas
2007-02-12 20:26   ` Yann Dirson
2007-02-12 21:47     ` Yann Dirson
2007-02-19 23:07       ` Catalin Marinas
2007-02-19 23:28         ` Pavel Roskin
2007-02-20  0:00           ` Yann Dirson
2007-02-20 18:55             ` Yann Dirson
2007-02-19 23:44         ` Yann Dirson
2007-02-13  0:20   ` Pavel Roskin
2007-02-13 22:48     ` Catalin Marinas
2007-02-19 20:47       ` Yann Dirson

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.