git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/6] user-manual: edit "ignoring files" for conciseness
       [not found] ` <464a8a7a15fc70efbcf56c4569f0f7275a9c76fe.1188139206.git.bfields@citi.umich.edu>
@ 2007-08-26 16:16   ` J. Bruce Fields
       [not found]   ` <a5f90f31302eb47cb1aa2f12447376ff9332abef.1188139206.git.bfields@citi.umich.edu>
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: J. Bruce Fields @ 2007-08-26 16:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, J. Bruce Fields, J. Bruce Fields, Johan Herland

From: J. Bruce Fields <bfields@puzzle.fieldses.org>

The immediate motivation for writing this section was to explain the
various places ignore patterns could be used.  However, I still think
.gitignore is the case most people will want to learn about first.  It
also makes it a bit more concrete to introduce ignore patterns in the
context of .gitignore first.  And the existance of gitignore(5) relieves
the pressure to explain it all here.

So, stick to the .gitignore example, with only a brief mention of the
others, explain the syntax only by example, and leave the rest to
gitignore(5).

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Johan Herland <johan@herland.net>
---
 Documentation/user-manual.txt |   63 +++++++++++-----------------------------
 1 files changed, 18 insertions(+), 45 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d6caff4..0331bad 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1100,20 +1100,14 @@ backup files made by your editor. Of course, 'not' tracking files with git
 is just a matter of 'not' calling "`git add`" on them. But it quickly becomes
 annoying to have these untracked files lying around; e.g. they make
 "`git add .`" and "`git commit -a`" practically useless, and they keep
-showing up in the output of "`git status`", etc.
+showing up in the output of "`git status`".
 
-Git therefore provides "exclude patterns" for telling git which files to
-actively ignore. Exclude patterns are thoroughly explained in the
-gitlink:gitignore[5] manual page, but the heart of the concept is simply
-a list of files which git should ignore. Entries in the list may contain
-globs to specify multiple files, or may be prefixed by "`!`" to
-explicitly include (un-ignore) a previously excluded (ignored) file
-(i.e. later exclude patterns override earlier ones).  The following
-example should illustrate such patterns:
+You can tell git to ignore certain files by creating a file called .gitignore
+in the top level of your working directory, with contents such as:
 
 -------------------------------------------------
 # Lines starting with '#' are considered comments.
-# Ignore foo.txt.
+# Ignore any file named foo.txt.
 foo.txt
 # Ignore (generated) html files,
 *.html
@@ -1123,41 +1117,20 @@ foo.txt
 *.[oa]
 -------------------------------------------------
 
-The next question is where to put these exclude patterns so that git can
-find them. Git looks for exclude patterns in the following files:
-
-`.gitignore` files in your working tree:::
-	   You may store multiple `.gitignore` files at various locations in your
-	   working tree. Each `.gitignore` file is applied to the directory where
-	   it's located, including its subdirectories. Furthermore, the
-	   `.gitignore` files can be tracked like any other files in your working
-	   tree; just do a "`git add .gitignore`" and commit. `.gitignore` is
-	   therefore the right place to put exclude patterns that are meant to
-	   be shared between all project participants, such as build output files
-	   (e.g. `\*.o`), etc.
-`.git/info/exclude` in your repo:::
-	   Exclude patterns in this file are applied to the working tree as a
-	   whole. Since the file is not located in your working tree, it does
-	   not follow push/pull/clone like `.gitignore` can do. This is therefore
-	   the place to put exclude patterns that are local to your copy of the
-	   repo (i.e. 'not' shared between project participants), such as
-	   temporary backup files made by your editor (e.g. `\*~`), etc.
-The file specified by the `core.excludesfile` config directive:::
-	   By setting the `core.excludesfile` config directive you can tell git
-	   where to find more exclude patterns (see gitlink:git-config[1] for
-	   more information on configuration options). This config directive
-	   can be set in the per-repo `.git/config` file, in which case the
-	   exclude patterns will apply to that repo only. Alternatively, you
-	   can set the directive in the global `~/.gitconfig` file to apply
-	   the exclude pattern to all your git repos. As with the above
-	   `.git/info/exclude` (and, indeed, with git config directives in
-	   general), this directive does not follow push/pull/clone, but remain
-	   local to your repo(s).
-
-[NOTE]
-In addition to the above alternatives, there are git commands that can take
-exclude patterns directly on the command line. See gitlink:git-ls-files[1]
-for an example of this.
+See gitlink:gitignore[5] for a detailed explanation of the syntax.  You can
+also place .gitignore files in other directories in your working tree, and they
+will apply to those directories and their subdirectories.  The `.gitignore`
+files can be added to your repository like any other files (just run `git add
+.gitignore` and `git commit`, as usual), which is convenient when the exclude
+patterns (such as patterns matching build output files) would also make sense
+for other users who clone your repository.
+
+If you wish the exclude patterns to affect only certain repositories
+(instead of every repository for a given project), you may instead put
+them in a file in your repository named .git/info/exclude, or in any file
+specified by the `core.excludesfile` configuration variable.  Some git
+commands can also take exclude patterns directly on the command line.
+See gitlink:gitignore[5] for the details.
 
 [[how-to-merge]]
 How to merge
-- 
1.5.3.rc5.19.g0734d

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/6] user-manual: minor editing for conciseness
       [not found]   ` <a5f90f31302eb47cb1aa2f12447376ff9332abef.1188139206.git.bfields@citi.umich.edu>
@ 2007-08-26 16:16     ` J. Bruce Fields
  0 siblings, 0 replies; 7+ messages in thread
From: J. Bruce Fields @ 2007-08-26 16:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, J. Bruce Fields, J. Bruce Fields

From: J. Bruce Fields <bfields@puzzle.fieldses.org>

Just cutting out a few unnecessary words.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
 Documentation/user-manual.txt |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 0331bad..933177a 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -42,10 +42,9 @@ How to get a git repository
 It will be useful to have a git repository to experiment with as you
 read this manual.
 
-The best way to get one is by using the gitlink:git-clone[1] command
-to download a copy of an existing repository for a project that you
-are interested in.  If you don't already have a project in mind, here
-are some interesting examples:
+The best way to get one is by using the gitlink:git-clone[1] command to
+download a copy of an existing repository.  If you don't already have a
+project in mind, here are some interesting examples:
 
 ------------------------------------------------
 	# git itself (approx. 10MB download):
@@ -63,9 +62,6 @@ directory, you will see that it contains a copy of the project files,
 together with a special top-level directory named ".git", which
 contains all the information about the history of the project.
 
-In most of the following, examples will be taken from one of the two
-repositories above.
-
 [[how-to-check-out]]
 How to check out a different version of a project
 -------------------------------------------------
-- 
1.5.3.rc5.19.g0734d

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/6] user-manual: introduce the word "commit" earlier
       [not found]   ` <a2ef9d633f67edc227b00209d5b72ec388388877.1188139206.git.bfields@citi.umich.edu>
@ 2007-08-26 16:16     ` J. Bruce Fields
  0 siblings, 0 replies; 7+ messages in thread
From: J. Bruce Fields @ 2007-08-26 16:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, J. Bruce Fields

From: J. Bruce Fields <bfields@citi.umich.edu>

Use the word "commit" as a synonym for "version" from the start.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
 Documentation/user-manual.txt |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 933177a..6d35a1f 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -66,14 +66,14 @@ contains all the information about the history of the project.
 How to check out a different version of a project
 -------------------------------------------------
 
-Git is best thought of as a tool for storing the history of a
-collection of files.  It stores the history as a compressed
-collection of interrelated snapshots (versions) of the project's
-contents.
+Git is best thought of as a tool for storing the history of a collection
+of files.  It stores the history as a compressed collection of
+interrelated snapshots of the project's contents.  In git each such
+version is called a <<def_commit,commit>>.
 
 A single git repository may contain multiple branches.  It keeps track
 of them by keeping a list of <<def_head,heads>> which reference the
-latest version on each branch; the gitlink:git-branch[1] command shows
+latest commit on each branch; the gitlink:git-branch[1] command shows
 you the list of branch heads:
 
 ------------------------------------------------
-- 
1.5.3.rc5.19.g0734d

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/6] user-manual: use pithier example commit
       [not found]   ` <e2618ff42716dd7cbc7a353670f46f357c5fb4c5.1188139206.git.bfields@citi.umich.edu>
@ 2007-08-26 16:17     ` J. Bruce Fields
  0 siblings, 0 replies; 7+ messages in thread
From: J. Bruce Fields @ 2007-08-26 16:17 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, J. Bruce Fields

From: J. Bruce Fields <bfields@citi.umich.edu>

Actually, we should have a competition for the favorite example commit.
Criteria:

	- length: one-line changes with one-line comments preferred,
	  and no long lines
	- significance/memorability
	- comic value

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
 Documentation/user-manual.txt |   45 ++++++++++++++++++----------------------
 1 files changed, 20 insertions(+), 25 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 6d35a1f..77e73bf 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -145,32 +145,27 @@ current branch:
 
 ------------------------------------------------
 $ git show
-commit 2b5f6dcce5bf94b9b119e9ed8d537098ec61c3d2
-Author: Jamal Hadi Salim <hadi@cyberus.ca>
-Date:   Sat Dec 2 22:22:25 2006 -0800
-
-    [XFRM]: Fix aevent structuring to be more complete.
-    
-    aevents can not uniquely identify an SA. We break the ABI with this
-    patch, but consensus is that since it is not yet utilized by any
-    (known) application then it is fine (better do it now than later).
-    
-    Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
-    Signed-off-by: David S. Miller <davem@davemloft.net>
-
-diff --git a/Documentation/networking/xfrm_sync.txt b/Documentation/networking/xfrm_sync.txt
-index 8be626f..d7aac9d 100644
---- a/Documentation/networking/xfrm_sync.txt
-+++ b/Documentation/networking/xfrm_sync.txt
-@@ -47,10 +47,13 @@ aevent_id structure looks like:
+commit 17cf781661e6d38f737f15f53ab552f1e95960d7
+Author: Linus Torvalds <torvalds@ppc970.osdl.org.(none)>
+Date:   Tue Apr 19 14:11:06 2005 -0700
+
+    Remove duplicate getenv(DB_ENVIRONMENT) call
+
+    Noted by Tony Luck.
+
+diff --git a/init-db.c b/init-db.c
+index 65898fa..b002dc6 100644
+--- a/init-db.c
++++ b/init-db.c
+@@ -7,7 +7,7 @@
  
-    struct xfrm_aevent_id {
-              struct xfrm_usersa_id           sa_id;
-+             xfrm_address_t                  saddr;
-              __u32                           flags;
-+             __u32                           reqid;
-    };
-...
+ int main(int argc, char **argv)
+ {
+-	char *sha1_dir = getenv(DB_ENVIRONMENT), *path;
++	char *sha1_dir, *path;
+ 	int len, i;
+ 
+ 	if (mkdir(".git", 0755) < 0) {
 ------------------------------------------------
 
 As you can see, a commit shows who made the latest change, what they
-- 
1.5.3.rc5.19.g0734d

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/6] user-manual: fix incorrect header level
       [not found]   ` <d5821de2e29a3a207a2c5188f73b7d1f6d52fc34.1188139206.git.bfields@citi.umich.edu>
@ 2007-08-26 16:17     ` J. Bruce Fields
  0 siblings, 0 replies; 7+ messages in thread
From: J. Bruce Fields @ 2007-08-26 16:17 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, J. Bruce Fields

From: J. Bruce Fields <bfields@citi.umich.edu>

This section is a subsection of the "Examples" section.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
 Documentation/user-manual.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 77e73bf..1c3f0e6 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -914,7 +914,7 @@ they look OK.
 
 [[Finding-comments-with-given-content]]
 Finding commits referencing a file with given content
------------------------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Somebody hands you a copy of a file, and asks which commits modified a
 file such that it contained the given content either before or after the
-- 
1.5.3.rc5.19.g0734d

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 6/6] Documentation/user-manual.txt: fix a few omissions of gitlink commands.
       [not found]   ` <a115daff12d8d26975ff15a4278a212df2c8c70b.1188139206.git.bfields@citi.umich.edu>
@ 2007-08-26 16:17     ` J. Bruce Fields
  0 siblings, 0 replies; 7+ messages in thread
From: J. Bruce Fields @ 2007-08-26 16:17 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, David Kastrup

From: David Kastrup <dak@gnu.org>

Signed-off-by: David Kastrup <dak@gnu.org>
---
 Documentation/user-manual.txt |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 1c3f0e6..2e8c050 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1728,11 +1728,12 @@ taken from the message containing each patch.
 Public git repositories
 -----------------------
 
-Another way to submit changes to a project is to tell the maintainer of
-that project to pull the changes from your repository using git-pull[1].
-In the section "<<getting-updates-with-git-pull, Getting updates with
-git pull>>" we described this as a way to get updates from the "main"
-repository, but it works just as well in the other direction.
+Another way to submit changes to a project is to tell the maintainer
+of that project to pull the changes from your repository using
+gitlink:git-pull[1].  In the section "<<getting-updates-with-git-pull,
+Getting updates with git pull>>" we described this as a way to get
+updates from the "main" repository, but it works just as well in the
+other direction.
 
 If you and the maintainer both have accounts on the same machine, then
 you can just pull changes from each other's repositories directly;
@@ -1989,7 +1990,8 @@ $ cd work
 Linus's tree will be stored in the remote branch named origin/master,
 and can be updated using gitlink:git-fetch[1]; you can track other
 public trees using gitlink:git-remote[1] to set up a "remote" and
-git-fetch[1] to keep them up-to-date; see <<repositories-and-branches>>.
+gitlink:git-fetch[1] to keep them up-to-date; see
+<<repositories-and-branches>>.
 
 Now create the branches in which you are going to work; these start out
 at the current tip of origin/master branch, and should be set up (using
-- 
1.5.3.rc5.19.g0734d

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/6] user-manual: edit "ignoring files" for conciseness
       [not found] ` <11881450231606-git-send-email->
       [not found]   ` <11881450231010-git-send-email->
@ 2007-08-26 19:57   ` Johan Herland
  1 sibling, 0 replies; 7+ messages in thread
From: Johan Herland @ 2007-08-26 19:57 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Junio C Hamano, git, J. Bruce Fields

On Sunday 26 August 2007 09:16:57 J. Bruce Fields wrote:
> From: J. Bruce Fields <bfields@puzzle.fieldses.org>
>
> The immediate motivation for writing this section was to explain the
> various places ignore patterns could be used.  However, I still think
> .gitignore is the case most people will want to learn about first.  It
> also makes it a bit more concrete to introduce ignore patterns in the
> context of .gitignore first.  And the existance of gitignore(5) relieves
> the pressure to explain it all here.
>
> So, stick to the .gitignore example, with only a brief mention of the
> others, explain the syntax only by example, and leave the rest to
> gitignore(5).
>
> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
> Cc: Johan Herland <johan@herland.net>

Acked-By: Johan Herland <johan@herland.net>


Have fun!

...Johan

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-08-26 20:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <11881450221019-git-send-email->
     [not found] ` <464a8a7a15fc70efbcf56c4569f0f7275a9c76fe.1188139206.git.bfields@citi.umich.edu>
2007-08-26 16:16   ` [PATCH 1/6] user-manual: edit "ignoring files" for conciseness J. Bruce Fields
     [not found]   ` <a5f90f31302eb47cb1aa2f12447376ff9332abef.1188139206.git.bfields@citi.umich.edu>
2007-08-26 16:16     ` [PATCH 2/6] user-manual: minor editing " J. Bruce Fields
     [not found]   ` <a2ef9d633f67edc227b00209d5b72ec388388877.1188139206.git.bfields@citi.umich.edu>
2007-08-26 16:16     ` [PATCH 3/6] user-manual: introduce the word "commit" earlier J. Bruce Fields
     [not found]   ` <e2618ff42716dd7cbc7a353670f46f357c5fb4c5.1188139206.git.bfields@citi.umich.edu>
2007-08-26 16:17     ` [PATCH 4/6] user-manual: use pithier example commit J. Bruce Fields
     [not found]   ` <d5821de2e29a3a207a2c5188f73b7d1f6d52fc34.1188139206.git.bfields@citi.umich.edu>
2007-08-26 16:17     ` [PATCH 5/6] user-manual: fix incorrect header level J. Bruce Fields
     [not found]   ` <a115daff12d8d26975ff15a4278a212df2c8c70b.1188139206.git.bfields@citi.umich.edu>
2007-08-26 16:17     ` [PATCH 6/6] Documentation/user-manual.txt: fix a few omissions of gitlink commands J. Bruce Fields
     [not found] ` <11881450231606-git-send-email->
     [not found]   ` <11881450231010-git-send-email->
     [not found]     ` <11881450233251-git-send-email->
     [not found]       ` <11881450231946-git-send-email->
2007-08-26 19:57   ` [PATCH 1/6] user-manual: edit "ignoring files" for conciseness Johan Herland

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).