From 5330e04c82c96fe34def416842af686b94666946 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 14 Jun 2016 22:23:36 +0300 Subject: [PATCH] Use git remote update Update remote-tracking branches without updating local branches. --- pep-103.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pep-103.txt b/pep-103.txt index b5ef798..f17f08f 100644 --- a/pep-103.txt +++ b/pep-103.txt @@ -193,6 +193,14 @@ remote-tracking branches, creates a local branch ``v1``, configure it to track upstream remotes/origin/v1 branch and checks out ``v1`` into the working directory. +Some commands, like ``git status``, report the difference between +local and remote branches. Please remember they only do comparison +with remote-tracking branches in your local repository, and the state +of those remote-tracking branches can be outdated. To update +remote-tracking branches you either fetch and merge (or rebase) +commits from the remote repository or update remote-tracking branches +without updating local branches. + Updating local and remote-tracking branches ------------------------------------------- @@ -344,6 +352,12 @@ That changed in git 2.3, but see `the blog post for caveats; in 2.4 the push-to-deploy feature was `further improved `_. +To update remote-tracking branches without updating local branches run +``git remote update [$REMOTE...]``. For example:: + + $ git remote update + $ git remote update origin + Tags '''' -- 2.39.5