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

Re: Git Commit Notes (fetching/pushing)

From
Brooke Kuhlmann <brooke@alchemists.io>
Date
Aug 7, 2023, 14:02 UTC
Message-ID
<2301E39E-B70D-485B-AFA8-F8DA64B366A2@alchemists.io>
In-Reply-To
<xmqqwmy7irsd.fsf@gitster.g>
Thanks Junio. Yep, I see where I went wrong now and learned something new in the process.
I ended up using the following configuration in order to explicitly fetch/push branches, notes, and tags:
[remote "origin"]
	url = https://github.com/bkuhlmann/test
	fetch = +refs/heads/*:refs/remotes/origin/*
	fetch = +refs/notes/*:refs/notes/*
	fetch = +refs/tags/*:refs/tags/*
	push = +refs/heads/*:refs/remotes/origin/*
	push = +refs/notes/*:refs/notes/*
	push = +refs/tags/*:refs/tags/*
The only problem is my feature branch never shows up on the remote. If I amend my commits, rebase them, and/or update the commit notes, the changes, once pushed, don't show up on the remote repository. I do see this in the output:
To https://github.com/bkuhlmann/test
   709004099276..1eefe6a1101c  refs/notes/commits -> refs/notes/commits
 + a966604d7864...e0a75df6084f release -> origin/release (forced update)
Seeing "forced update" in the output is strange because I'm using `git push` and not `git push --force-with-lease`.
Am I still missing a configuration setting that I should be aware of? I'm not getting errors but the output is odd.
Show 16 quoted lines
> On Aug 6, 2023, at 7:07 PM, Junio C Hamano <gitster@pobox.com> wrote:
> 
> Brooke Kuhlmann <brooke@alchemists.io> writes:
> 
>> ... o why default branch push behavior is being
>> ignored/overwritten.
> 
> The root of your confusion lies around here, I think.  The "default"
> branch push behaviour is given only when you do not customize.  Once
> you add customization, you would specify _exactly_ what you want.
> 
> In other words, the customization is NOT something you tell Git to
> do _in addition to_ what it does anyway (otherwise you would not be
> able to configure _away_ what is usually done by default when you do
> not want to see it done).
> 
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “Git Commit Notes (fetching/pushing)”
  1. Brooke KuhlmannAug 6, 2023
  2. Taylor BlauAug 6, 2023
  3. Brooke KuhlmannAug 6, 2023
  4. Junio C HamanoAug 7, 2023
  5. Brooke KuhlmannAug 7, 2023
  6. Junio C HamanoAug 7, 2023
  7. Brooke KuhlmannAug 7, 2023

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.