Penguin

Differences between version 16 and predecessor to the previous major change of Git.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 16 Last edited on Wednesday, January 14, 2009 12:47:05 am by AristotlePagaltzis Revert
Older page: version 15 Last edited on Tuesday, November 21, 2006 12:40:51 pm by IanMcDonald Revert
@@ -1,15 +1,26 @@
-[Git] is a storage backend for a VersionControlSystem, written by LinusTorvalds and tailored to the needs of the LinuxKernel developers. It was born of necessity when BitKeeper's licence was changed such that it was no longer an acceptable home for the LinuxKernel, but all other VersionControlSystem~s were found inadequate. 
+[Git] is an OpenSource VersionControlSystem (although it originally started as just a storage backend). It was initially written by LinusTorvalds for the needs of the LinuxKernel developers, but due to a clever but simple internal design it can be tailored to nearly any development workflot . It is itself kept [in a Git repository | http://master.kernel.org/git/?p=git/git.git;a=summary]. The project was born of necessity when BitKeeper's licence was changed such that it was no longer an acceptable home for the LinuxKernel, but all other VersionControlSystem~s were found inadequate.  
+  
+> Torvalds seemed aware that his decision to drop BitKeeper would also be controversial. When asked why he called the new software, "git," British slang meaning "a rotten person," he said. "I'm an egotistical bastard, so I name all my projects after myself. First Linux, now git."  
+From [PC World: After controversy, Torvalds begins work on "git" | http://www.pcworld.idg.com.au/index.php/id;1852076002]  
+  
+!!! Design  
  
 [Git]'s primary design objective is to keep the computational effort of committing a patch proportional to the size of the patch, rather than the size of the repository, as would be the case with most VersionControlSystem~s. This is achieved by keeping every version of every object (ie a file in a directory), compressed using ZLib and identified by its [SHA1] sum. Contrary to traditional VersionControlSystem~s, this makes building a history for a single object computationally expensive, while at the same time making getting a view of any particular revision of the repository as a whole very cheap. 
  
-[Git] is OpenSource and itself kept in a [Git] archive available at [http://master.kernel.org/ git/?p=git/git.git;a=summary]. This now includes <i >gitk </i > which is quite a useful tool for viewing what's inside a [Git] graphically
+[Git] has two main ways of transferring data. Its native application protocol is implemented by the <tt> git fetch-pack< /tt> and <tt >git upload-pack </tt > commands, but [Git] can also crawl the files in the remote repository's object store without reliance on server-side intelligence . There are a number of transport protocols:  
  
-Git has a number of ways to transfer the data. The most efficient is it's native protocol called Git which uses [TCP] port 9418. It can also use rsync and HTTP. 
+* The most efficient transport protocol is called <tt>git://</tt>, which is merely a thin [TCP] wrapper around the application protocol, commonly using [Port] 9418. However it has no built-in access control so usually does not allow pushing, although it can.  
+* The default transport protocol is <tt>~ssh://</tt>. This tunnels the native protocol over [SSH]. Pushing is generally possible.  
+* On servers without [Git] installed, you should probably use rsync(1). Again, pushing is usually possible.  
+* Lastly, the slowest option is to simply publish the repository via [ HTTP]. If the WebServer supports WebDav, it can even accept pushes
  
----- 
+Note that when using a dumb transport, you must ensure that <tt>git update -server -info</tt> is run in the repository any time someone commits to it (eg. by setting up a hook). This maintains a static file with a stored index of the state of the repository which would be dynamically negotiated between <tt>git fetch -pack</tt> and <tt>git upload -pack</tt> in smart transports.  
+  
+!!! Notes  
+  
+You may encounter the following error:  
  
-If you get the following error:  
 <verbatim> 
 *** Environment problem: 
 *** Your name cannot be determined from your system services (gecos). 
 *** You would need to set GIT_AUTHOR_NAME and GIT_COMMITTER_NAME 
@@ -19,35 +30,31 @@
  
 fatal: empty ident <user@machine.localdomain> not allowed 
 </verbatim> 
  
-then you need to setup your real name in the system password file (/etc/passwd). gecos refers to this field in this case
+This means your RealName is not properly set up in the system user accounts list (<tt> /etc/passwd</tt>, specifically the [ gecos field | WikiPedia:gecos_field] for your account), which [Git] uses by default . You can either fix that or configure [Git] itself:  
  
-NB Putting those environment variables won't fix it if you don't have the real name in!  
-  
-----  
-  
-> Torvalds seemed aware that his decision to drop BitKeeper would also be controversial . When asked why he called the new software, "git," British slang meaning "a rotten person," he said. "I'm an egotistical bastard, so I name all my projects after myself. First Linux, now git."  
-From [PC World: After controversy, Torvalds begins work on " git" | http://www .pcworld .idg.com.au /index.php/id;1852076002]  
-  
-----  
+<verbatim>  
+git config --global user .name Joe Random Hacker  
+git config --global user .email jrh@example .org  
+< /verbatim>  
  
-Historical notes  
+This will set your default username (saved in <tt>~~/.gitconfig</tt>). Alternatively you can set your username specifically for a particular repository (stored in <tt>projectroot/.git/config</tt>) by omitting the <tt>--global</tt> switch.  
  
-(as git is in a [Package ] for most distributions now)  
+!! Installing [Git ] documentation when compiling from source  
  
-To create the [Git] documentation you need to do
+You need to build it separately
  
 <verbatim> 
 make doc 
 make install-doc 
 </verbatim> 
  
-You may need to install extra packages on your machine as it has quite a few requirements . In particular <tt>asciidoc</tt> must be at least version 7 unless you want to hack the MakeFile~s. If you are running DebianLinux Sarge you will need to take this from testing. See AptNotes for more details on how to do this. 
+Note that it depends on quite a few extra tools, so you may need to install extra [Package]s on your machine. In particular <tt>asciidoc</tt> must be at least version 7 unless you want to hack the MakeFile~s. If you are running DebianLinux Sarge you will need to take this from testing. See AptNotes for more details on how to do this. 
  
-Alternatively the man pages can be found at http://www.kernel.org/pub/software/scm/git/docs/ if you don't have permissions to install locally from the [Git] [Package] (although you can always have local man pages if you setup your enivronment variables correctly).  
+Alternatively the ManPage~s can be found online at http://www.kernel.org/pub/software/scm/git/docs/ 
  
 To be able to use [Git], you need to bootstrap your installation using the TarBall at [http://www.codemonkey.org.uk/projects/git-snapshots/git/]. 
  
-----  
+!!! See also  
  
-See also KernelDevelopmentWithGit 
+* KernelDevelopmentWithGit