git branch -r vs git remote show origin
问题 So I was looking for a way to see a list of all the branches that exist on the remote, and found the following 2 commands: 1. git branch -r 2. git remote show origin Whats the difference between the 2 commands? 回答1: The git branch command looks at (or, invoked differently, modifies) your own repository's information. For remote-tracking branches ( git branch -r ), this shows what's in your cached copy of what was on the remotes the last time you had your git contact those remotes and get