Skip to content

Commit e9b4908

Browse files
wkinggitster
authored andcommitted
user-manual: use 'remote add' to setup push URLs
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d32805d commit e9b4908

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Documentation/user-manual.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,16 +1992,21 @@ will not be updated by the push. This may lead to unexpected results if
19921992
the branch you push to is the currently checked-out branch!
19931993

19941994
As with `git fetch`, you may also set up configuration options to
1995-
save typing; so, for example, after
1995+
save typing; so, for example:
1996+
1997+
-------------------------------------------------
1998+
$ git remote add public-repo ssh://yourserver.com/~you/proj.git
1999+
-------------------------------------------------
2000+
2001+
adds the following to `.git/config`:
19962002

19972003
-------------------------------------------------
1998-
$ cat >>.git/config <<EOF
19992004
[remote "public-repo"]
2000-
url = ssh://yourserver.com/~you/proj.git
2001-
EOF
2005+
url = yourserver.com:proj.git
2006+
fetch = +refs/heads/*:refs/remotes/example/*
20022007
-------------------------------------------------
20032008

2004-
you should be able to perform the above push with just
2009+
which lets you do the same push with just
20052010

20062011
-------------------------------------------------
20072012
$ git push public-repo master

0 commit comments

Comments
 (0)