💾 Archived View for gemini.rlamacraft.uk › techGuides › gitBranchDescriptions.gmi captured on 2023-01-29 at 15:28:06. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-07-16)

-=-=-=-=-=-=-

Git Branch Descriptions

Here's a neat little feature of git that I just learnt about. It turns out that git branches can have associated descriptions, although they are local only. All you have to do to set one is to run the command `git branch --edit-description` which will open your editor, just like writing a commit message. To view the git branch's description you run the command `git config branch.<name>.description`, i.e. `git config branch.main.description` for the main branch. This can be shortened to `git config branch.`gb`.description` if you have a shell function `gb` defined as `git branch --show-current`; a handy little shortcut for commands like `git push -u origin `gb``, where you need a reference to the current branch rather than HEAD.

~~~

Last Updated: 2022-07-16

..