diff options
author | Corentin BOMPARD <corentin.bompard@etu.univ-lyon1.fr> | 2019-08-19 11:11:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-08-19 13:05:58 -0700 |
commit | 24bc1a129260eaf713c87f087f28883fe18891b5 (patch) | |
tree | 3c5098f09f385529668f3a3b5915f69c1a093346 /t/t4010-diff-pathspec.sh | |
parent | Sync with Git 2.22.1 (diff) | |
download | tgif-24bc1a129260eaf713c87f087f28883fe18891b5.tar.xz |
pull, fetch: add --set-upstream option
Add the --set-upstream option to git pull/fetch
which lets the user set the upstream configuration
(branch.<current-branch-name>.merge and
branch.<current-branch-name>.remote) for the current branch.
A typical use-case is:
git clone http://example.com/my-public-fork
git remote add main http://example.com/project-main-repo
git pull --set-upstream main master
or, instead of the last line:
git fetch --set-upstream main master
git merge # or git rebase
This is mostly equivalent to cloning project-main-repo (which sets
upsteam) and then "git remote add" my-public-fork, but may feel more
natural for people using a hosting system which allows forking from
the web UI.
This functionality is analog to "git push --set-upstream".
Signed-off-by: Corentin BOMPARD <corentin.bompard@etu.univ-lyon1.fr>
Signed-off-by: Nathan BERBEZIER <nathan.berbezier@etu.univ-lyon1.fr>
Signed-off-by: Pablo CHABANNE <pablo.chabanne@etu.univ-lyon1.fr>
Signed-off-by: Matthieu Moy <git@matthieu-moy.fr>
Patch-edited-by: Matthieu Moy <git@matthieu-moy.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4010-diff-pathspec.sh')
0 files changed, 0 insertions, 0 deletions