From: Bernie Innocenti <bernie@codewiz.org>
To: git@vger.kernel.org
Subject: How newbies create remote repositories
Date: Wed, 11 Mar 2009 07:59:47 +0100 [thread overview]
Message-ID: <49B76163.2080205@codewiz.org> (raw)
Here's another usability problem report from my friends who
are learning their way to Git from previous experience with
Subversion and Mercurial.
Three of them confessed they couldn't find a simple recipe
to setup remote repositories, after looking in obvious
places such as the git-push manpage.
Each one could figure it out independently after some time, coming
up with a variety of creative strategies:
Strategy 1:
client$ ssh server
server$ mkdir foo.git
server$ cd foo.git
server$ git init --bare --shared
server$ exit
client$ git push --mirror server:foo.git
Problem: Does not setup the remote for you.
Solution: Would be nice if "git push <URL>" could give this tip
Problem: Requires a full unrestricted shell on the server
Solution: If "git init <dir>" was supported, one could do
ssh server git init --bare --shared foo.git
Strategy 2:
client$ ssh server
server$ mkdir foo.git
server$ cd foo.git
server$ git init --bare --shared
server$ exit
client$ git clone server:foo.git .
client$ git add .
client$ git commit
client$ git push
Problem: only works if you had no local repository yet
Strategy 3:
client$ scp -r .git server:foo.git
client$ cd ..
client$ rm -r foo
client$ git clone server:foo.git
Problem: the user checks out the repository from scratch
to properly add the remote
Solution: "git pull" might suggest to use "git remote".
A simple "git remote create" or "git remote new" along with a
reference to it in the manpage of "git push" might have helped
these users.
--
// Bernie Innocenti - http://www.codewiz.org/
\X/ Sugar Labs - http://www.sugarlabs.org/
reply other threads:[~2009-03-11 7:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=49B76163.2080205@codewiz.org \
--to=bernie@codewiz.org \
--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 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.