> Can this command be set up as an alias ? This would require to pass a
parameter somehow ?
yes it can be an alias, but because the branch name is inserted in the
command line it need to be a shell alias passing in the branch name as $1.
On Thursday, December 2, 2021 at 11:30:49 AM UTC Philip Oakley wrote:
> > Sorry but what is {u} supposed to be? The url of the remote server?
>
> The '@{u}' is a shorthand for '@{upstream}' typed exactly, that modifies
> the given branch name to become the upstream of the given branch, and then
> rev-parse finds its pretty name, and abbrev-ref trims off the leading part
> of the "ref/./.....".
>
> Worth looking up "@" and its qualifiers ;-)
>
> On Thursday, December 2, 2021 at 7:45:33 AM UTC [email protected] wrote:
>
>> >>> "PO" == Philip Oakley <[email protected]> writes:
>>
>> > git rev-parse --abbrev-ref --symbolic-full-name <branchname>@{u}
>> > Had to look it up yesterday. Then you need
>>
>> Sorry but what is {u} supposed to be? The url of the remote server?
>>
>> I tried out
>> git rev-parse --abbrev-ref --symbolic-full-name master@{git+ssh://
>> [email protected]/p/matlab-emacs/src
>> <http://[email protected]/p/matlab-emacs/src>}
>>
>> Or
>>
>> git rev-parse --abbrev-ref --symbolic-full-name master@{origin}
>>
>> None worked. I surely missed something essential.
>>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/git-users/75776565-1e78-41b9-afd9-388bc430d58en%40googlegroups.com.