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

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

From
Philippe Blain <levraiphilippeblain@gmail.com>
Date
Jul 30, 2021, 13:35 UTC
Message-ID
<9b8b3a12-6801-1c5d-9cfb-c87b51cd9548@gmail.com>
In-Reply-To
<20210729020125.746206-1-mathstuf@gmail.com>
Hi Ben,
Le 2021-07-28 à 22:01, Ben Boeckel a écrit :
Show 16 quoted lines
> 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'm in favor of a change like the one you propose, thanks for working on this!

The 'triangular' aka 'forking' workflow is, as you discovered, only explicitely mentioned in the description of '@{push}' [1]. 'gitworkflows(5)' is mostly about how the workflow used by the Git projet itself (from the description):

     This document attempts to write down and motivate some of the workflow
     elements used for git.git itself.
Show 14 quoted lines
> 
> 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
> 

Small nit: usually when sending a second version of a patch, you would use the '-v2' argument to 'git format-patch' so that the patch and cover letter is prefixed [PATCH v2].

[1] https://git-scm.com/docs/gitrevisions#Documentation/gitrevisions.txt-emltbranchnamegtpushemegemmasterpushemempushem
Previous: Ben BoeckelNext: Ben Boeckel
Message 16 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.