some doc updates
1) talk about "git merge" instead of "git pull ." 2) suggest "git repo-config" instead of directly editing config files 3) echo "URL: blah" > .git/remotes/foo is obsolete and should be "git repo-config remote.foo.url blah" 4) support for partial URL prefix has been removed (see commit ea560e6d64374ec1f6c163c276319a3da21a1345) so drop mention of it. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Nicolas Pitre committed
Jan 14, 2007 at 22:44 UTC
c14261eaa297504799e3b21ecbd751edbae912c0
5 files changed
+29
-49
Documentation/core-tutorial.txt
+12
-30
@@ -1129,46 +1129,26 @@ juggle multiple lines of development simultaneously. Of
1129
course, you will pay the price of more disk usage to hold
1130
multiple working trees, but disk space is cheap these days.
1131
1132
-[NOTE]
1133
-You could even pull from your own repository by
1134
-giving '.' as <remote-repository> parameter to `git pull`. This
1135
-is useful when you want to merge a local branch (or more, if you
1136
-are making an Octopus) into the current branch.
1137
-
1132
It is likely that you will be pulling from the same remote
1133
repository from time to time. As a short hand, you can store
1140
-the remote repository URL in a file under .git/remotes/
1141
-directory, like this:
1142
-
1143
-------------------------------------------------
1144
-$ mkdir -p .git/remotes/
1145
-$ cat >.git/remotes/linus <<\EOF
1146
-URL: http://www.kernel.org/pub/scm/git/git.git/
1147
-EOF
1148
-------------------------------------------------
1149
-
1150
-and use the filename to `git pull` instead of the full URL.
1151
-The URL specified in such file can even be a prefix
1152
-of a full URL, like this:
1134
+the remote repository URL in the local repository's config file
1135
+like this:
1136
1137
------------------------------------------------
1155
-$ cat >.git/remotes/jgarzik <<\EOF
1156
-URL: http://www.kernel.org/pub/scm/linux/git/jgarzik/
1157
-EOF
1138
+$ git repo-config remote.linus.url http://www.kernel.org/pub/scm/git/git.git/
1139
------------------------------------------------
1140
1141
+and use the "linus" keyword with `git pull` instead of the full URL.
1142
1143
Examples.
1144
1145
. `git pull linus`
1146
. `git pull linus tag v0.99.1`
1165
-. `git pull jgarzik/netdev-2.6.git/ e100`
1147
1148
the above are equivalent to:
1149
1150
. `git pull http://www.kernel.org/pub/scm/git/git.git/ HEAD`
1151
. `git pull http://www.kernel.org/pub/scm/git/git.git/ tag v0.99.1`
1171
-. `git pull http://www.kernel.org/pub/.../jgarzik/netdev-2.6.git e100`
1152
1153
1154
How does the merge work?
@@ -1546,7 +1526,8 @@ on that project and has an own "public repository" goes like this:
1526
1527
1. Prepare your work repository, by `git clone` the public
1528
repository of the "project lead". The URL used for the
1549
- initial cloning is stored in `.git/remotes/origin`.
1529
+ initial cloning is stored in the remote.origin.url
1530
+ configuration variable.
1531
1532
2. Prepare a public repository accessible to others, just like
1533
the "project lead" person does.
@@ -1586,14 +1567,15 @@ like this:
1567
1. Prepare your work repository, by `git clone` the public
1568
repository of the "project lead" (or a "subsystem
1569
maintainer", if you work on a subsystem). The URL used for
1589
- the initial cloning is stored in `.git/remotes/origin`.
1570
+ the initial cloning is stored in the remote.origin.url
1571
+ configuration variable.
1572
1573
2. Do your work in your repository on 'master' branch.
1574
1575
3. Run `git fetch origin` from the public repository of your
1576
upstream every once in a while. This does only the first
1577
half of `git pull` but does not merge. The head of the
1596
- public repository is stored in `.git/refs/heads/origin`.
1578
+ public repository is stored in `.git/refs/remotes/origin/master`.
1579
1580
4. Use `git cherry origin` to see which ones of your patches
1581
were accepted, and/or use `git rebase origin` to port your
@@ -1681,11 +1663,11 @@ $ git reset --hard master~2
1663
1664
You can make sure 'git show-branch' matches the state before
1665
those two 'git merge' you just did. Then, instead of running
1684
-two 'git merge' commands in a row, you would pull these two
1666
+two 'git merge' commands in a row, you would merge these two
1667
branch heads (this is known as 'making an Octopus'):
1668
1669
------------
1688
-$ git pull . commit-fix diff-fix
1670
+$ git merge commit-fix diff-fix
1671
$ git show-branch
1672
! [commit-fix] Fix commit message normalization.
1673
! [diff-fix] Fix rename detection.
@@ -1701,7 +1683,7 @@ $ git show-branch
1683
1684
Note that you should not do Octopus because you can. An octopus
1685
is a valid thing to do and often makes it easier to view the
1704
-commit history if you are pulling more than two independent
1686
+commit history if you are merging more than two independent
1687
changes at the same time. However, if you have merge conflicts
1688
with any of the branches you are merging in and need to hand
1689
resolve, that is an indication that the development happened in
Documentation/everyday.txt
+1
-2
@@ -148,8 +148,7 @@ modification will be caught if you do `git commit -a` later.
148
<8> redo the commit undone in the previous step, using the message
149
you originally wrote.
150
<9> switch to the master branch.
151
-<10> merge a topic branch into your master branch. You can also use
152
-`git pull . alsa-audio`, i.e. pull from the local repository.
151
+<10> merge a topic branch into your master branch.
152
<11> review commit logs; other forms to limit output can be
153
combined and include `\--max-count=10` (show 10 commits),
154
`\--until=2005-12-10`, etc.
Documentation/git-pull.txt
+2
-1
@@ -52,7 +52,8 @@ git pull origin next::
52
53
git pull . fixes enhancements::
54
Bundle local branch `fixes` and `enhancements` on top of
55
- the current branch, making an Octopus merge.
55
+ the current branch, making an Octopus merge. This `git pull .`
56
+ syntax is equivalent to `git merge`.
57
58
git pull -s ours . obsolete::
59
Merge local branch `obsolete` into the current branch,
Documentation/git-rerere.txt
+5
-5
@@ -81,7 +81,7 @@ One way to do it is to pull master into the topic branch:
81
82
------------
83
$ git checkout topic
84
- $ git pull . master
84
+ $ git merge master
85
86
o---*---o---+ topic
87
/ /
@@ -103,10 +103,10 @@ in which case the final commit graph would look like this:
103
104
------------
105
$ git checkout topic
106
- $ git pull . master
106
+ $ git merge master
107
$ ... work on both topic and master branches
108
$ git checkout master
109
- $ git pull . topic
109
+ $ git merge topic
110
111
o---*---o---+---o---o topic
112
/ / \
@@ -126,11 +126,11 @@ top of the tip before the test merge:
126
127
------------
128
$ git checkout topic
129
- $ git pull . master
129
+ $ git merge master
130
$ git reset --hard HEAD^ ;# rewind the test merge
131
$ ... work on both topic and master branches
132
$ git checkout master
133
- $ git pull . topic
133
+ $ git merge topic
134
135
o---*---o-------o---o topic
136
/ \
Documentation/tutorial.txt
+9
-11
@@ -11,15 +11,13 @@ diff" with:
11
$ man git-diff
12
------------------------------------------------
13
14
-It is a good idea to introduce yourself to git before doing any
15
-operation. The easiest way to do so is:
14
+It is a good idea to introduce yourself to git with your name and
15
+public email address before doing any operation. The easiest
16
+way to do so is:
17
18
------------------------------------------------
18
-$ cat >~/.gitconfig <<\EOF
19
-[user]
20
- name = Your Name Comes Here
21
- email = you@yourdomain.example.com
22
-EOF
19
+$ git repo-config --global user.name "Your Name Comes Here"
20
+$ git repo-config --global user.email you@yourdomain.example.com
21
------------------------------------------------
22
23
@@ -211,7 +209,7 @@ at this point the two branches have diverged, with different changes
209
made in each. To merge the changes made in experimental into master, run
210
211
------------------------------------------------
214
-$ git pull . experimental
212
+$ git merge experimental
213
------------------------------------------------
214
215
If the changes don't conflict, you're done. If there are conflicts,
@@ -316,14 +314,14 @@ shows a list of all the changes that Bob made since he branched from
314
Alice's master branch.
315
316
After examining those changes, and possibly fixing things, Alice
319
-could pull the changes into her master branch:
317
+could merge the changes into her master branch:
318
319
-------------------------------------
320
$ git checkout master
323
-$ git pull . bob-incoming
321
+$ git merge bob-incoming
322
-------------------------------------
323
326
-The last command is a pull from the "bob-incoming" branch in Alice's
324
+The last command is a merge from the "bob-incoming" branch in Alice's
325
own repository.
326
327
Alice could also perform both steps at once with: