git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* simple git use case
@ 2009-02-05  4:52 Erik Iverson
  2009-02-05  8:21 ` Jay Soffian
  0 siblings, 1 reply; 3+ messages in thread
From: Erik Iverson @ 2009-02-05  4:52 UTC (permalink / raw)
  To: git

Dear all,

I sincerely hope this is not an annoying question, I promise I have tried to do 
my homework here, but am stuck.  My use case is simple.  I have a desktop and a 
laptop.  When I go on the trips, I'd love to be able to bring my "git-test" 
directory with me on the laptop, code some, and then get the new revisions back 
on the desktop when I get home (bonus if I can get the revisions back to my 
desktop over the internet while still on the road, in case, for example, my 
laptop gets stolen).  No one else will be working on this stuff, it's strictly 
for me.

OK, so here's what I do.

Desktop (dt):

dt> cd git-test
dt> git-init
Initialized empty Git repository in /home/erik/projects/git-test/.git/
dt> git add .
dt> git-commit -am 'initial commit'
Created initial commit c150815: initial commit
  3 files changed, 14 insertions(+), 0 deletions(-)
  create mode 100644 test.R
  create mode 100644 test.sas
  create mode 100644 test.tex

Looks good...
Now over to the laptop (lt)!

lt> git-clone ssh://myip/path/to/project

And great, I have the three test.* files, looks good!
So I make some changes to test.R on laptop, like I'm on the road. Then, on laptop:

lt> git-commit -am 'an update'

Looks good.

Now I become a mouth-breather...and need some help :).

My instinct was to git-push from the laptop,

lt> git-push

which succeeds, but then a git-pull
from desktop says:

dt> git-pull
fatal: 'origin': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly

OK, so look around mailing list archives...I try, without knowing what it means 
at all:

dt> git-config branch.master.remote .
dt> git-pull
 From .
  * branch            HEAD       -> FETCH_HEAD
Already up-to-date.

Hmmm, so it did something, but not what I'd expect.  How about:

dt> git-checkout
M	test.R

So it realizes that file has been modified...

dt> git-checkout -f

This gives no message of any type, and now I see my modified test.R file on my 
desktop, so good! I'm happy with this, but I must know, it this the Right Way to 
use git for my use case, or am I doing something silly?

Thank you for providing this software.

Best Regards,
Erik Iverson

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

end of thread, other threads:[~2009-02-05 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-05  4:52 simple git use case Erik Iverson
2009-02-05  8:21 ` Jay Soffian
2009-02-05 14:57   ` Sitaram Chamarty

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).