From: Bagas Sanjaya <bagasdotme@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>, git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Derrick Stolee <stolee@gmail.com>, Jeff King <peff@peff.net>,
Felipe Contreras <felipe.contreras@gmail.com>,
Robert Karszniewicz <avoidr@posteo.de>,
Emily Shaffer <emilyshaffer@google.com>
Subject: Re: [PATCH 1/6] gittutorial doc: replace "alice" and "bob" with "you" and "www-data"
Date: Wed, 16 Jun 2021 10:43:32 +0700 [thread overview]
Message-ID: <8250d8af-2d52-321c-36a7-d71c29fc1ef1@gmail.com> (raw)
In-Reply-To: <patch-1.6-abbb5b9ba13-20210615T161330Z-avarab@gmail.com>
On 15/06/21 23.17, Ævar Arnfjörð Bjarmason wrote:
> -Suppose that Alice has started a new project with a Git repository in
> -/home/alice/project, and that Bob, who has a home directory on the
> -same machine, wants to contribute.
> +Suppose that you've started a new project with a Git repository in
> +/home/you/project, and you'd like another user on the same local
> +machine to be able to contribute to it. E.g. a www-data user to serve
> +the content up with a webserver.
>
> -Bob begins with:
> +As the `www-data` user do:
> > ------------------------------------------------
> -bob$ git clone /home/alice/project myrepo
> +www-data$ git clone /home/you/project /var/www-data/deployment
> ------------------------------------------------
>
This assumes that we're on Debian or its derivatives, however many users
run Git on other distributions (Fedora, Arch, Gentoo, openSUSE, etc.),
so `www-data` user may not be present there. Also, `www-data` is system
account, as opposed to normal user account, so you can't log in to it;
you need as root `chown -R www-data:www-data /somewhere/`.
This also assumes that we use Apache HTTPD. The setup for other
webservers may be different. For example, if NGINX is used (installed
from upstream packages rather than from Debian package repository), you
need to make site root (the path specified in `root` directive) readable
by `nginx` user.
> -This creates a new directory "myrepo" containing a clone of Alice's
> +This creates a new directory "deployment" containing a clone of your
> repository. The clone is on an equal footing with the original
> project, possessing its own copy of the original project's history.
>
But the scenario is we're cloning from local repo, so `git clone` here
implies --local (and bypasses normal Git transport mechanism), so to get
clone experience similar to when using remote repo, we can use
--no-local instead.
> -Bob then makes some changes and commits them:
> +As `www-data` you then makes some changes and commit them:
>
> ------------------------------------------------
> (edit files)
> -bob$ git commit -a
> +www-data$ git commit -a
> (repeat as necessary)
> ------------------------------------------------
>
> -When he's ready, he tells Alice to pull changes from the repository
> -at /home/bob/myrepo. She does this with:
> +You can then pull those changes to the checkout in your home directory
> +at /home/you/project:
>
> ------------------------------------------------
> -alice$ cd /home/alice/project
> -alice$ git pull /home/bob/myrepo master
> +you$ cd /home/you/project
> +you$ git pull /var/www-data/deployment master
> ------------------------------------------------
>
The resulting rewrite until this point makes no sense for me. Previously
we have Alice and Bob working the project, but now you do the same, one
as normal user account and one as system user `www-data`. Honestly I
would like keeping the status quo.
--
An old man doll... just what I always wanted! - Clara
next prev parent reply other threads:[~2021-06-16 3:43 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 16:17 [PATCH 0/6] doc: replace "alice" and "bob" examples Ævar Arnfjörð Bjarmason
2021-06-15 16:17 ` [PATCH 1/6] gittutorial doc: replace "alice" and "bob" with "you" and "www-data" Ævar Arnfjörð Bjarmason
2021-06-16 3:43 ` Bagas Sanjaya [this message]
2021-06-16 4:50 ` Junio C Hamano
2021-06-16 21:04 ` Felipe Contreras
2021-06-17 20:38 ` Ævar Arnfjörð Bjarmason
2021-06-15 16:17 ` [PATCH 2/6] gitcvs-migration " Ævar Arnfjörð Bjarmason
2021-06-16 4:02 ` Bagas Sanjaya
2021-06-15 16:18 ` [PATCH 3/6] daemon doc + code comments: reword "alice" example Ævar Arnfjörð Bjarmason
2021-06-15 16:18 ` [PATCH 4/6] fast-import doc: change "bob" in an example to "file.txt" Ævar Arnfjörð Bjarmason
2021-06-15 16:18 ` [PATCH 5/6] doc: replace "alice" and "bob" with "jdoe" and "msmith" Ævar Arnfjörð Bjarmason
2021-06-15 16:18 ` [PATCH 6/6] pack-protocol doc: use "www-data" in place of "alice" Ævar Arnfjörð Bjarmason
2021-06-15 16:46 ` [PATCH 0/6] doc: replace "alice" and "bob" examples Robert P. J. Day
2021-06-15 18:45 ` Ævar Arnfjörð Bjarmason
2021-06-15 16:54 ` Felipe Contreras
2021-06-15 19:09 ` Ævar Arnfjörð Bjarmason
2021-06-16 20:56 ` Felipe Contreras
2021-06-17 15:48 ` Phillip Susi
2021-06-17 20:51 ` Ævar Arnfjörð Bjarmason
2021-06-16 1:52 ` Junio C Hamano
2021-06-16 9:30 ` Robert P. J. Day
2021-06-16 12:00 ` Jeff King
2021-06-16 20:59 ` Felipe Contreras
2021-06-16 21:02 ` Randall S. Becker
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=8250d8af-2d52-321c-36a7-d71c29fc1ef1@gmail.com \
--to=bagasdotme@gmail.com \
--cc=avarab@gmail.com \
--cc=avoidr@posteo.de \
--cc=emilyshaffer@google.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=stolee@gmail.com \
/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).