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

[PATCH try2 0/8] Introduce publish tracking branch

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Oct 12, 2013, 07:05 UTC
Message-ID
<1381561561-20459-1-git-send-email-felipe.contreras@gmail.com>

As it has been discussed before, our support for triangular workflows is lacking, and the following patch series aims to improve that situation.

We have the concept of upstream branch (e.g. 'origin/master') which is to where our topic branches eventually should be merged to, so it makes sense that 'git rebase' uses that as the destination, but most people would not push to such upstream branch, they would push to a publish branch (e.g. 'github/feature-a'). We could set our upstream to the place we push, and 'git push' would be able to use that as default, and 'git branch --vv' would show how ahead/behind we are in comparisson to that branch, but then 'git rebase' (or 'git merge') would be using the wrong branch.

This patch series adds:
 1) git push --set-publish
 2) git branch --set-publish
 3) git branch -vv # uses and shows the publish branch when configured
After this, it becomes much easier to track branches in a triangular workflow.
  master          e230c56 [origin/master, gh/master] Git 1.8.4
* fc/publish      0a105fd [master, gh/fc/publish: ahead 1] branch: display publish branch
  fc/branch/fast  177dcad [master, gh/fc/branch/fast] branch: reorganize verbose options
  fc/trivial      f289b9a [master: ahead 7] branch: trivial style fix
  fc/leaks        d101af4 [master: ahead 2] read-cache: plug a possible leak
  stable          e230c56 Git 1.8.4
Felipe Contreras (8):
  branch: trivial cleanup
  branch: reorganize verbose options
  push: trivial reorganization
  Add concept of 'publish' branch
  branch: allow configuring the publish branch
  t: branch add publish branch tests
  push: add --set-publish option
  branch: display publish branch
 Documentation/git-branch.txt |  11 +++++
 Documentation/git-push.txt   |   9 +++-
 branch.c                     |  43 +++++++++++++++++
 branch.h                     |   2 +
 builtin/branch.c             | 107 +++++++++++++++++++++++++++++++++++++------
 builtin/push.c               |  52 +++++++++++++--------
 remote.c                     |  34 +++++++++++---
 remote.h                     |   4 ++
 t/t3200-branch.sh            |  76 ++++++++++++++++++++++++++++++
 t/t5529-push-publish.sh      |  70 ++++++++++++++++++++++++++++
 t/t6040-tracking-info.sh     |   8 ++--
 transport.c                  |  28 +++++++----
 transport.h                  |   1 +
 13 files changed, 393 insertions(+), 52 deletions(-)
 create mode 100755 t/t5529-push-publish.sh
-- 
1.8.4-fc
Next: Felipe Contreras
Message 1 of 11 in “Introduce publish tracking branch”
  1. 0/8 Introduce publish tracking branchFelipe Contreras, Oct 12, 2013
  2. 7/8 push: add --set-publish optionFelipe Contreras, Oct 12, 2013
  3. Eric SunshineOct 13, 2013
  4. Felipe ContrerasOct 13, 2013
  5. 6/8 t: branch add publish branch testsFelipe Contreras, Oct 12, 2013
  6. 4/8 Add concept of 'publish' branchFelipe Contreras, Oct 12, 2013
  7. 1/8 branch: trivial cleanupFelipe Contreras, Oct 12, 2013
  8. 2/8 branch: reorganize verbose optionsFelipe Contreras, Oct 12, 2013
  9. 3/8 push: trivial reorganizationFelipe Contreras, Oct 12, 2013
  10. 8/8 branch: display publish branchFelipe Contreras, Oct 12, 2013
  11. 5/8 branch: allow configuring the publish branchFelipe Contreras, Oct 12, 2013

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.