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
ea560e6d64) so drop mention of it.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Nicolas Pitre18 years agocommitted byJunio C Hamano
@ -1129,46 +1129,26 @@ juggle multiple lines of development simultaneously. Of
@@ -1129,46 +1129,26 @@ juggle multiple lines of development simultaneously. Of
course, you will pay the price of more disk usage to hold
multiple working trees, but disk space is cheap these days.
[NOTE]
You could even pull from your own repository by
giving '.' as <remote-repository> parameter to `git pull`. This
is useful when you want to merge a local branch (or more, if you
are making an Octopus) into the current branch.
It is likely that you will be pulling from the same remote
repository from time to time. As a short hand, you can store
the remote repository URL in a file under .git/remotes/
directory, like this:
------------------------------------------------
$ mkdir -p .git/remotes/
$ cat >.git/remotes/linus <<\EOF
URL: http://www.kernel.org/pub/scm/git/git.git/
EOF
------------------------------------------------
and use the filename to `git pull` instead of the full URL.
The URL specified in such file can even be a prefix
of a full URL, like this:
the remote repository URL in the local repository's config file
@ -1546,7 +1526,8 @@ on that project and has an own "public repository" goes like this:
@@ -1546,7 +1526,8 @@ on that project and has an own "public repository" goes like this:
1. Prepare your work repository, by `git clone` the public
repository of the "project lead". The URL used for the
initial cloning is stored in `.git/remotes/origin`.
initial cloning is stored in the remote.origin.url
configuration variable.
2. Prepare a public repository accessible to others, just like
the "project lead" person does.
@ -1586,14 +1567,15 @@ like this:
@@ -1586,14 +1567,15 @@ like this:
1. Prepare your work repository, by `git clone` the public
repository of the "project lead" (or a "subsystem
maintainer", if you work on a subsystem). The URL used for
the initial cloning is stored in `.git/remotes/origin`.
the initial cloning is stored in the remote.origin.url
configuration variable.
2. Do your work in your repository on 'master' branch.
3. Run `git fetch origin` from the public repository of your
upstream every once in a while. This does only the first
half of `git pull` but does not merge. The head of the
public repository is stored in `.git/refs/heads/origin`.
public repository is stored in `.git/refs/remotes/origin/master`.
4. Use `git cherry origin` to see which ones of your patches
were accepted, and/or use `git rebase origin` to port your
@ -148,8 +148,7 @@ modification will be caught if you do `git commit -a` later.
@@ -148,8 +148,7 @@ modification will be caught if you do `git commit -a` later.
<8> redo the commit undone in the previous step, using the message
you originally wrote.
<9> switch to the master branch.
<10> merge a topic branch into your master branch. You can also use
`git pull . alsa-audio`, i.e. pull from the local repository.
<10> merge a topic branch into your master branch.
<11> review commit logs; other forms to limit output can be
combined and include `\--max-count=10` (show 10 commits),
@ -81,7 +81,7 @@ One way to do it is to pull master into the topic branch:
@@ -81,7 +81,7 @@ One way to do it is to pull master into the topic branch:
------------
$ git checkout topic
$ git pull . master
$ git merge master
o---*---o---+ topic
/ /
@ -103,10 +103,10 @@ in which case the final commit graph would look like this:
@@ -103,10 +103,10 @@ in which case the final commit graph would look like this:
------------
$ git checkout topic
$ git pull . master
$ git merge master
$ ... work on both topic and master branches
$ git checkout master
$ git pull . topic
$ git merge topic
o---*---o---+---o---o topic
/ / \
@ -126,11 +126,11 @@ top of the tip before the test merge:
@@ -126,11 +126,11 @@ top of the tip before the test merge:
@ -211,7 +209,7 @@ at this point the two branches have diverged, with different changes
@@ -211,7 +209,7 @@ at this point the two branches have diverged, with different changes
made in each. To merge the changes made in experimental into master, run
------------------------------------------------
$ git pull . experimental
$ git merge experimental
------------------------------------------------
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
@@ -316,14 +314,14 @@ shows a list of all the changes that Bob made since he branched from
Alice's master branch.
After examining those changes, and possibly fixing things, Alice
could pull the changes into her master branch:
could merge the changes into her master branch:
-------------------------------------
$ git checkout master
$ git pull . bob-incoming
$ git merge bob-incoming
-------------------------------------
The last command is a pull from the "bob-incoming" branch in Alice's
The last command is a merge from the "bob-incoming" branch in Alice's