pub fn get_default_remote_for_push(repo_path: &RepoPath) -> Result<String>Expand description
Tries to find the default repo to push to based on configuration.
remote.pushDefault
The remote to push to by default. Overrides
branch.<name>.remotefor all branches, and is overridden bybranch.<name>.pushRemotefor specific branches.
branch.
<name>.remoteWhen on branch
<name>, it tellsgit fetchandgit pushwhich remote to fetch from or push to. The remote to push to may be overridden withremote.pushDefault(for all branches). The remote to push to, for the current branch, may be further overridden bybranch.<name>.pushRemote. If no remote is configured, or if you are not on any branch and there is more than one remote defined in the repository, it defaults tooriginfor fetching andremote.pushDefaultfor pushing.
Falls back to get_default_remote_in_repo.