Hi, I recently discovered some of the nicer behaviors of the `--track` option for local branches (courtesy of `vim-fugitive`'s status rendering). However, after a few weeks of slowly working `-t origin/master` into my workflow, I figured that Git could help me out here. This patch adds two new configuration variables to initialize the `branch.<name>.*` settings for tracking remote branches. I searched the docs (including `Documentation/gitworkflows.txt`), but didn't see anywhere to describe the fork-based workflow common on forges (such as GitHub and GitLab) where this felt "at home". I suppose I could describe the workflow I'm used to, but I think I'll hammer that out as blog posts before submitting it as documentation. I suspect there are more tests that should be added. Thanks, --Ben --- v1 -> v2: - removed `branch.defaultPushRemote` (`remote.pushDefault` covers this case already) - improved the commit message with more background and an expanation of the intended uses Ben Boeckel (1): config: support a default remote tracking setup upon branch creation Documentation/config/branch.txt | 14 ++++++++++++ branch.c | 22 ++++++++++--------- branch.h | 2 ++ config.c | 10 +++++++++ environment.c | 2 ++ t/t3200-branch.sh | 39 +++++++++++++++++++++++++++++++++ 6 files changed, 79 insertions(+), 10 deletions(-) base-commit: eb27b338a3e71c7c4079fbac8aeae3f8fbb5c687 -- 2.31.1