'When would Git move remote-tracking branches automatically, without 'git fetch'?
The Git documentation (https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches) says: "Remote-tracking branches are references to the state of remote branches...Git moves them for you whenever you do any network communication"
Under what conditions would the remote-tracking branch move upon network communication if you hadn't used 'git fetch' to pull in anything new from the remote?
Solution 1:[1]
Very few Git commands communicate with the remote, in general. Among these, the ones that do update the remote-tracking branches are:
git clonegit push(mentioned above)git pull(since it runsgit fetch)git submodule update(fetches the submodules)git remote update(a command not often taught these days)
I think that’s all for the main "porcelain" commands.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
