Git - determine branch remote source
Kenneth Burgener
kenneth at mail1.ttak.org
Mon Feb 14 10:09:05 MST 2011
Thank you everyone for your responses.
Andrew McNabb wrote:
> There might be a better way, but you could always do:
> git config branch.master.remote
> to show the remote associated with the branch "master".
Hi, this did indeed report which remote branch was created from, but it
did not report which branch on the remote it was from.
Nathan Blackham wrote:
> I always look in the .git/config file in the repo. It has all config
> for that repo including the remote location.
This does work, I just thought there would be an official method that
didn't involve messing with the underlying git file system.
Dennis Muhlestein wrote:
> You could type:
> git remote -v show
This shows the remotes. What I am looking for is if I branch one of
those remotes, how do I tell which remote and remote branch the local
branch was created from.
I think I found the answer though. There is a command "ls-remote".
This appears to show the current checked out local branch's remote URL
(not the remote's local name) and the remote branch.
Thanks,
Kenneth
More information about the PLUG
mailing list