git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/1] Improve automatic setup of tracking for new branches

From
Ben Boeckel <mathstuf@gmail.com>
Date
Jul 29, 2021, 02:01 UTC
Message-ID
<20210729020125.746206-1-mathstuf@gmail.com>
In-Reply-To
<20210728135041.501850-1-mathstuf@gmail.com>
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
Previous: Junio C HamanoNext: Ben Boeckel
Message 6 of 20 in “Improve automatic setup of tracking for new branches”
  1. 0/1 Improve automatic setup of tracking for new branchesBen Boeckel, Jul 28, 2021
  2. 1/1 config: support setting up a remote tracking branch upon creationBen Boeckel, Jul 28, 2021
  3. Junio C HamanoJul 28, 2021
  4. Ben BoeckelJul 28, 2021
  5. Junio C HamanoJul 28, 2021
  6. 0/1 Improve automatic setup of tracking for new branchesBen Boeckel, Jul 29, 2021
  7. 1/1 config: support a default remote tracking setup upon branch creationBen Boeckel, Jul 29, 2021
  8. Philippe BlainJul 30, 2021
  9. Ben BoeckelJul 30, 2021
  10. Junio C HamanoJul 30, 2021
  11. Ævar Arnfjörð BjarmasonAug 2, 2021
  12. Ben BoeckelAug 2, 2021
  13. Ævar Arnfjörð BjarmasonAug 2, 2021
  14. Junio C HamanoJul 30, 2021
  15. Ben BoeckelJul 30, 2021
  16. Philippe BlainJul 30, 2021
  17. Ben BoeckelJul 30, 2021
  18. Philippe BlainJul 30, 2021
  19. Ben BoeckelJul 30, 2021
  20. Johannes SchindelinAug 2, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.