Thanks !

Your command:

git rev-parse --abbrev-ref --symbolic-full-name <branchname>@{u} 

Works by replacing <branchname> with the current branch name or any local 
branch name. (Does not seem to work with any remote branch name)

So far this limitation seems ok for now though if it could find any remote 
branch name that would be cool too.

Example that should work on most people's repository:

git rev-parse --abbrev-ref --symbolic-full-name master@{u} 

Question though:

Can this command be set up as an alias ? This would require to pass a 
parameter somehow ?

The git documentation does not specify how to do that:

https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases

All examples seem to assume the parameter is at the end of the command ?

I know in dos I could use %1, %2, %3 but I am not familiar with bash.

One final question:

I did not get the part about the need to use the remote command ?

Do you mean to find the URL ?

Or do you mean that you have multiple remotes setup with the same alias ?

like 

origin url1
origin url2 

?

I am not sure if it's possible to setup multiple remotes with the same 
alias ? ;)

Or perhaps you mean that your command might return:

Git1 url
Git2 url
Git3 url

If there are multiple remotes with partially the same name ?

Bye,
  Skybuck.

On Wednesday, December 1, 2021 at 10:46:17 PM UTC+1 philip...@iee.email 
wrote:

>  git rev-parse --abbrev-ref --symbolic-full-name <branchname>@{u}
>
> Had to look it up yesterday. Then you need
>
> git remote -v   # or -vv
>
> to find out where that remote really is!
> - I have 10 remotes for variations of 'git' itself, including "my" which 
> is my publish remote.
>
> On Wednesday, December 1, 2021 at 2:51:06 PM UTC skybu...@hotmail.com 
> wrote:
>
>> It would be usefull if there was a command to see the tracking 
>> information for the current branch, if any.
>>
>> Right now I am trying to figure out if any tracking is set for the local 
>> branch to some kind of remote branch.
>>
>> There does not seem to be a command for it ?
>>
>> I know there are other commands to display all: git branch -vv
>>
>> However if the number of branches become very large, I may end up having 
>> to search through such a list.
>>
>> Displaying such a huge list also distracts from the rest of the git 
>> command flow.
>>
>> So something more tiny would be appreciated.
>>
>> Bye for now,
>>   Skybuck.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/1767abbd-ee09-427b-8c57-c74882eebb1bn%40googlegroups.com.

Reply via email to