progit / progit2

Pro Git 2nd Edition
Other
5.69k stars 1.88k forks source link

Add negative refspec examples to 10.5 Git Internals - The Refspec #1816

Open michaelblyons opened 1 year ago

michaelblyons commented 1 year ago

General overview of your idea.

Since Git v2.29.0, it has been possible to add negative refspec markers to the fetch config. These are modestly popular, but the documentation is buried in a multi-paragraph explanation on a fairly obscure doc page. Please consider adding a subheading and/or some examples to the relevant section of the Git Book.

What problem will this solve?

Negative refspecs are a fairly helpful tool for people whose upstream branches are not optimally named[^1]. It's a shame that the feature is not more widely covered.

[^1]: This isn't the user's fault. It's the project's fault.

Have you thought about other solutions?

Please feel totally free[^2] to lift, adapt, etc. the text from my Stack Overflow example if that's helpful.

[^2]: For the purposes of this project, any copyright I hold on that answer is waived.

Do you want to help with this enhancement idea?

Maybe