From: Erik Iverson <iverson@biostat.wisc.edu>
To: git@vger.kernel.org
Subject: simple git use case
Date: Wed, 04 Feb 2009 22:52:03 -0600 [thread overview]
Message-ID: <498A7073.4060206@biostat.wisc.edu> (raw)
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
next reply other threads:[~2009-02-05 5:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-05 4:52 Erik Iverson [this message]
2009-02-05 8:21 ` simple git use case Jay Soffian
2009-02-05 14:57 ` Sitaram Chamarty
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=498A7073.4060206@biostat.wisc.edu \
--to=iverson@biostat.wisc.edu \
--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 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).