From a557a7d1170ec19a7cd0be6795c808f45f929f01 Mon Sep 17 00:00:00 2001 From: Ben Lynn Date: Fri, 26 Jun 2009 14:12:33 -0700 Subject: [PATCH] Forgot I had introduced push in an earlier chapter. --- en/clone.txt | 14 +++++++++++++- en/multiplayer.txt | 21 ++++++--------------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/en/clone.txt b/en/clone.txt index 07a572b..69e32b3 100644 --- a/en/clone.txt +++ b/en/clone.txt @@ -33,7 +33,8 @@ and start the Git daemon if necessary: $ GIT_DIR=proj.git git init $ git daemon --detach # it might already be running -Some public hosts, such as http://repo.or.cz[repo.or.cz], will have a different method for setting up the initially empty Git repository, such as filling in a form on a webpage. +For Git hosting services, follow the instructions to setup the initially +empty Git repository. Typically one fills in a form on a webpage. Push your project to the central server with: @@ -53,6 +54,17 @@ If the main server has been updated, the latest version needs to be checked out $ git commit -a $ git pull +==== Push versus pull ==== + +We mostly avoid pushing into a repository, because confusion can ensue +if the destination has a working directory with changes. However, pushing into +a bare repository is a straightforward operation and more suitable than a pull +in this case. + +Pulling from the server requires shelling into the server, and also +knowing the network address of the machine you happen to be working on. +Furthermore, firewalls may interfere. + === Forking a Project === Sick of the way a project is being run? Think you could do a better job? Then on your server: diff --git a/en/multiplayer.txt b/en/multiplayer.txt index 6243054..c46b920 100644 --- a/en/multiplayer.txt +++ b/en/multiplayer.txt @@ -47,17 +47,6 @@ and anybody can get your project with: $ git clone http://web.server/proj.git -==== Push versus pull ==== - -Pushing into a repository with a working directory that contains changes can -be confusing so we have so far avoided this command. However, pushing into a -bare repository is a straightforward operation, and more convenient than a pull -in this case. - -Pulling from the server requires shelling into the server, and also -knowing the network address of the machine you happen to be working on. -Furthermore, firewalls may interfere. - === Git Over Anything === Want to synchronize repositories without servers, or even a network connection? @@ -227,8 +216,8 @@ branches, and more. === My Preferences === -For my projects, I like contributors to prepare Git trees which I can pull. -With some Git hosting services, you can host your own fork of a project at +For my projects, I like contributors to prepare Git repositories which I can +pull. Some Git hosting services let you host your own fork of a project with the click of a button. After I fetch a tree, I run Git commands to navigate and examine the changes, @@ -242,5 +231,7 @@ http://torvalds-family.blogspot.com/2009/06/happiness-is-warm-scm.html[this blog post by Linus Torvalds]. Staying in the Git world is slightly more convenient than patch files, as it -saves me the step of converting them to Git commits, possibly adding author -information and a description along the way. +saves me the step of converting them to Git commits. Furthermore, Git +automatically handles details such as recording the author's name and email +address, as well as the time and date, and asks the author to describe +their own change. -- 2.11.4.GIT