Merge branch 'wk/man-deny-current-branch-is-default-these-days' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 27 Feb 2013 18:01:21 +0000 (10:01 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 Feb 2013 18:01:21 +0000 (10:01 -0800)
* wk/man-deny-current-branch-is-default-these-days:
user-manual: typofix (ofthe->of the)
user-manual: Update for receive.denyCurrentBranch=refuse

1  2 
Documentation/user-manual.txt
index 52c8523c7dc1048f0f8f04b334071d4bfefee685,299fc1e3ff9e6346ee576966272874d08f26c937..20e5b4216d3bf25b826ed5c835ec1a2d4594c3f5
@@@ -782,7 -782,7 +782,7 @@@ e05db0fd4f31dde7005f075a84f96b360d05984
  
  Or you could recall that the ... operator selects all commits
  contained reachable from either one reference or the other but not
 -both: so
 +both; so
  
  -------------------------------------------------
  $ git log origin...master
@@@ -931,20 -931,11 +931,20 @@@ The linkgit:git-archive[1] command can 
  any version of a project; for example:
  
  -------------------------------------------------
 -$ git archive --format=tar --prefix=project/ HEAD | gzip >latest.tar.gz
 +$ git archive -o latest.tar.gz --prefix=project/ HEAD
  -------------------------------------------------
  
 -will use HEAD to produce a tar archive in which each filename is
 -preceded by "project/".
 +will use HEAD to produce a gzipped tar archive in which each filename
 +is preceded by `project/`.  The output file format is inferred from
 +the output file extension if possible, see linkgit:git-archive[1] for
 +details.
 +
 +Versions of Git older than 1.7.7 don't know about the 'tar.gz' format,
 +you'll need to use gzip explicitly:
 +
 +-------------------------------------------------
 +$ git archive --format=tar --prefix=project/ HEAD | gzip >latest.tar.gz
 +-------------------------------------------------
  
  If you're releasing a new version of a software project, you may want
  to simultaneously make a changelog to include in the release
@@@ -1000,16 -991,9 +1000,16 @@@ Developing with gi
  Telling git your name
  ---------------------
  
 -Before creating any commits, you should introduce yourself to git.  The
 -easiest way to do so is to make sure the following lines appear in a
 -file named .gitconfig in your home directory:
 +Before creating any commits, you should introduce yourself to Git.
 +The easiest way to do so is to use linkgit:git-config[1]:
 +
 +------------------------------------------------
 +$ git config --global user.name 'Your Name Comes Here'
 +$ git config --global user.email 'you@yourdomain.example.com'
 +------------------------------------------------
 +
 +Which will add the following to a file named `.gitconfig` in your
 +home directory:
  
  ------------------------------------------------
  [user]
        email = you@yourdomain.example.com
  ------------------------------------------------
  
 -(See the "CONFIGURATION FILE" section of linkgit:git-config[1] for
 -details on the configuration file.)
 +See the "CONFIGURATION FILE" section of linkgit:git-config[1] for
 +details on the configuration file.  The file is plain text, so you can
 +also edit it with your favorite editor.
  
  
  [[creating-a-new-repository]]
@@@ -1578,12 -1561,18 +1578,12 @@@ $ git stash po
  Ensuring good performance
  -------------------------
  
 -On large repositories, git depends on compression to keep the history
 -information from taking up too much space on disk or in memory.
 -
 -This compression is not performed automatically.  Therefore you
 -should occasionally run linkgit:git-gc[1]:
 -
 --------------------------------------------------
 -$ git gc
 --------------------------------------------------
 -
 -to recompress the archive.  This can be very time-consuming, so
 -you may prefer to run `git gc` when you are not doing other work.
 +On large repositories, Git depends on compression to keep the history
 +information from taking up too much space on disk or in memory.  Some
 +git commands may automatically run linkgit:git-gc[1], so you don't
 +have to worry about running it manually.  However, compressing a large
 +repository may take a while, so you may want to call `gc` explicitly
 +to avoid automatic compression kicking in when it is not convenient.
  
  
  [[ensuring-reliability]]
@@@ -1798,13 -1787,6 +1798,13 @@@ $ git format-patch origi
  will produce a numbered series of files in the current directory, one
  for each patch in the current branch but not in origin/HEAD.
  
 +`git format-patch` can include an initial "cover letter". You can insert
 +commentary on individual patches after the three dash line which
 +`format-patch` places after the commit message but before the patch
 +itself.  If you use `git notes` to track your cover letter material,
 +`git format-patch --notes` will include the commit's notes in a similar
 +manner.
 +
  You can then import these into your mail client and send them by
  hand.  However, if you have a lot to send at once, you may prefer to
  use the linkgit:git-send-email[1] script to automate the process.
@@@ -1942,11 -1924,11 +1942,11 @@@ linkgit:git-daemon[1] man page for deta
  examples section.)
  
  [[exporting-via-http]]
 -Exporting a git repository via http
 +Exporting a git repository via HTTP
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  The git protocol gives better performance and reliability, but on a
 -host with a web server set up, http exports may be simpler to set up.
 +host with a web server set up, HTTP exports may be simpler to set up.
  
  All you need to do is place the newly created bare git repository in
  a directory that is exported by the web server, and make some
@@@ -1972,7 -1954,7 +1972,7 @@@ $ git clone http://yourserver.com/~you/
  (See also
  link:howto/setup-git-server-over-http.txt[setup-git-server-over-http]
  for a slightly more sophisticated setup using WebDAV which also
 -allows pushing over http.)
 +allows pushing over HTTP.)
  
  [[pushing-changes-to-a-public-repository]]
  Pushing changes to a public repository
@@@ -2004,26 -1986,22 +2004,27 @@@ handling this case
  
  Note that the target of a "push" is normally a
  <<def_bare_repository,bare>> repository.  You can also push to a
- repository that has a checked-out working tree, but the working tree
- will not be updated by the push.  This may lead to unexpected results if
- the branch you push to is the currently checked-out branch!
+ repository that has a checked-out working tree, but a push to update the
+ currently checked-out branch is denied by default to prevent confusion.
+ See the description of the receive.denyCurrentBranch option
+ in linkgit:git-config[1] for details.
  
  As with `git fetch`, you may also set up configuration options to
 -save typing; so, for example, after
 +save typing; so, for example:
 +
 +-------------------------------------------------
 +$ git remote add public-repo ssh://yourserver.com/~you/proj.git
 +-------------------------------------------------
 +
 +adds the following to `.git/config`:
  
  -------------------------------------------------
 -$ cat >>.git/config <<EOF
  [remote "public-repo"]
 -      url = ssh://yourserver.com/~you/proj.git
 -EOF
 +      url = yourserver.com:proj.git
 +      fetch = +refs/heads/*:refs/remotes/example/*
  -------------------------------------------------
  
 -you should be able to perform the above push with just
 +which lets you do the same push with just
  
  -------------------------------------------------
  $ git push public-repo master
@@@ -2062,13 -2040,6 +2063,13 @@@ branch name with a plus sign
  $ git push ssh://yourserver.com/~you/proj.git +master
  -------------------------------------------------
  
 +Note the addition of the `+` sign.  Alternatively, you can use the
 +`-f` flag to force the remote update, as in:
 +
 +-------------------------------------------------
 +$ git push -f ssh://yourserver.com/~you/proj.git master
 +-------------------------------------------------
 +
  Normally whenever a branch head in a public repository is modified, it
  is modified to point to a descendant of the commit that it pointed to
  before.  By forcing a push in this situation, you break that convention.
@@@ -2873,34 -2844,48 +2874,34 @@@ branch.master.merge=refs/heads/maste
  
  If there are other repositories that you also use frequently, you can
  create similar configuration options to save typing; for example,
 -after
  
  -------------------------------------------------
 -$ git config remote.example.url git://example.com/proj.git
 +$ git remote add example git://example.com/proj.git
  -------------------------------------------------
  
 -then the following two commands will do the same thing:
 +adds the following to `.git/config`:
  
  -------------------------------------------------
 -$ git fetch git://example.com/proj.git master:refs/remotes/example/master
 -$ git fetch example master:refs/remotes/example/master
 +[remote "example"]
 +      url = git://example.com/proj.git
 +      fetch = +refs/heads/*:refs/remotes/example/*
  -------------------------------------------------
  
 -Even better, if you add one more option:
 +Also note that the above configuration can be performed by directly
 +editing the file `.git/config` instead of using linkgit:git-remote[1].
  
 --------------------------------------------------
 -$ git config remote.example.fetch master:refs/remotes/example/master
 --------------------------------------------------
 -
 -then the following commands will all do the same thing:
 +After configuring the remote, the following three commands will do the
 +same thing:
  
  -------------------------------------------------
 -$ git fetch git://example.com/proj.git master:refs/remotes/example/master
 -$ git fetch example master:refs/remotes/example/master
 +$ git fetch git://example.com/proj.git +refs/heads/*:refs/remotes/example/*
 +$ git fetch example +refs/heads/*:refs/remotes/example/*
  $ git fetch example
  -------------------------------------------------
  
 -You can also add a "+" to force the update each time:
 -
 --------------------------------------------------
 -$ git config remote.example.fetch +master:refs/remotes/example/master
 --------------------------------------------------
 -
 -Don't do this unless you're sure you won't mind "git fetch" possibly
 -throwing away commits on 'example/master'.
 -
 -Also note that all of the above configuration can be performed by
 -directly editing the file .git/config instead of using
 -linkgit:git-config[1].
 -
  See linkgit:git-config[1] for more details on the configuration
 -options mentioned above.
 +options mentioned above and linkgit:git-fetch[1] for more details on
 +the refspec syntax.
  
  
  [[git-concepts]]
@@@ -3405,7 -3390,7 +3406,7 @@@ $ git log --raw --al
  ------------------------------------------------
  
  and just looked for the sha of the missing object (4b9458b..) in that
 -whole thing. It's up to you - git does *have* a lot of information, it is
 +whole thing. It's up to you--Git does *have* a lot of information, it is
  just missing one particular blob version.
  
  [[the-index]]