Skip to content

Commit

Permalink
user-manual: use 'remote add' to setup push URLs
Browse files Browse the repository at this point in the history
There is no need to use here documents to setup this configuration.
It is easier, less confusing, and more robust to use `git remote add`
directly.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
W. Trevor King authored and Junio C Hamano committed Feb 18, 2013
1 parent d32805d commit e9b4908
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Documentation/user-manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1992,16 +1992,21 @@ 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!

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
Expand Down

0 comments on commit e9b4908

Please sign in to comment.