What is the purpose and function of Xcode Source Control "Show Remote State"?

While working in Xcode on a git project, I noticed the following menu item:

File > Source Control > Show Remote Status

      

and when you switch it changes to:

File > Source Control > Hide Remote Status

      

I have a remote Bitbucket git set up for a sample project I'm working on, but I can't figure out what this menu is supposed to show me, or where !? When I switch it, there is no visible change in my Xcode UI . I do have some changes that were only committed to the local git repository, not yet pushed to the remote machine, and I was expecting to see somewhere that the remote is not current, Show remote status. "

So what is this "remote state" information that Xcode should display, and where should I look for it? Is this function equivalent to what is usually requested on the git command line - and if so, what? Is there a window or panel that I have to open to see this information? I have a navigation area, a debug area and all the useful areas.

I searched the Xcode, Stack Overflow and Google documentation for Show Deleted Status and Hide Deleted Status, but none of the results were particularly interesting.

+3


source to share


1 answer


I haven't used Xcode yet (yet), but since Git is a distributed version control system, your local repo might get out of sync with the remote repo, i.e. their states may diverge. This is probably why you are given the opportunity to see what status the remote is, for example if any of its branches have been updated (i.e. there are new commits), if there are any new branches on it, and if there are branches removed from him.

On the command line, you usually get this kind of information by running git fetch --prune <remote>

to update the local branches of remote tracking, which track the state of your remote's branches (of course!). Then you can examine the remote tracking branches to see what the state of the remote repo is.



There is also a team git ls-remote <remote>

that will do a network operation to talk to the remote and return a list of remote current links / branches, but this is more of a plumbing team that is not really meant for typical Git, it was more for Git developers to build tools Git.

0


source







All Articles