In git I'm using the pull command to merge from a different repository, for example:
git pull ../mortoray-main/ mortoray-main
This will fetch and merge the mortoray-main
branch from the other repository into the current branch in the current repository.
What I'm looking for is how to setup the equivalent shortcut that I can just do this:
git pull mortoray
In my gitconfig I added this:
[remote "mortoray"]
url = ../mortoray-main/
fetch = mortoray-main
The problem is now that when I run git pull mortoray
I get the error: "You asked to pull from the remote 'mortoray', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line."
How does one configure the remote to get the shortcut to work as the original pull command?
Note that instead of 'git pull mortoray', the following works, but is of course not a shortcut:
git fetch mortoray
git merge FETCH_HEAD
This is exactly what the following does without using a "remote":
git pull ../mortoray-main/ mortoray-main
So the question is about the shortcut, I want a pull command which does the fetch and merge for me as the original pull command does:
git pull mortoray
Is there any configuration that would make this shortcut work as intended?