git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to jump between two repositories ...
@ 2007-12-05  5:59 g2
  2007-12-05  6:11 ` Shawn O. Pearce
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: g2 @ 2007-12-05  5:59 UTC (permalink / raw)
  To: git

Hello all,

I am currently working on some code at the office that I also want to  
work with at home. Seems like a good candidate for git. So I created a  
repository at work and did a "git clone" at home. I've run into some  
strange behaviour that I don't understand and would appreciate if  
someone can clarify for me.

Imagine this scenario. At work:
git init
edit test.c
git add test.c
git commit

Then at home:
git clone <work git url>
edit test.c
git commit -a
git push

At this point, I wanted to push my changes back to my work repository  
so I can continue work the next day. So at home, I did a git push. I  
expect that my work repository has the newest material, but I find  
that when I do "git status" at work the next day, it tells me that my  
test.c is "modified" and has already staged it for commit. I need to  
do a "git reset" followed by "git checkout" to update my work folder  
to the latest stuff.

Totally different from my expectation of the repository knowing that  
it is out of date and then kindly suggesting that I should do a "git  
update" of some sort. What piece of understanding am I missing to  
properly "get" what is going on here, and how am I supposed to  
properly work with this setup?

Thanks for any help.
Gerald.

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

end of thread, other threads:[~2007-12-05 16:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-05  5:59 How to jump between two repositories g2
2007-12-05  6:11 ` Shawn O. Pearce
2007-12-05  6:14 ` J. Bruce Fields
2007-12-05  8:45   ` Andreas Ericsson
2007-12-05 15:28     ` g2
2007-12-05 16:19       ` Andreas Ericsson
2007-12-05  6:20 ` Väinö Järvelä
2007-12-05  6:44   ` g2
2007-12-05  6:57     ` Steven Grimm
2007-12-05  7:32     ` Väinö Järvelä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).