Once a week we have integration meetings where we review code in branches not merged in to master. As a starting point we use this to list open branches
git branch -a --no-merged master
We name our branches after ticket numbers so it tough to see what we are really looking at. I get back
BUG_1231231
BUG_1412434
FEATURE_1231231
FEATURE_1232244
I know I can add and view descriptions by running git branch --edit-description BUG_1231231
git config branch.BUG_1231231
The issue is these descriptions seemed to be stored in the config of my local repository. Can these descriptions be pushed to the remote?
Push a new Git branch to a remote repo Clone the remote Git repo locally. Create a new branch with the branch, switch or checkout commands. Perform a git push with the –set-upstream option to set the remote repo for the new branch. Continue to perform Git commits locally on the new branch.
Pushing is how you transfer commits from your local repository to a remote repo. It's the counterpart to git fetch , but whereas fetching imports commits to local branches, pushing exports commits to remote branches. Remote branches are configured using the git remote command.
Branch description, can be edited with git branch --edit-description . Branch description is automatically added in the format-patch cover letter or request-pull summary.
Push Branch to Another Branch In some cases, you may want to push your changes to another branch on the remote repository. In order to push your branch to another remote branch, use the “git push” command and specify the remote name, the name of your local branch as the name of the remote branch.
Considering the description is stored in the config file (here, the local one, within your Git repo), then, no, branch descriptions aren't pushed.
Config files are not pushed (ever). See "Is it possible to clone git config from remote location?"
Simple text files are, though, as my initial answer for branch description recommended at the time.
Branch descriptions are all about helping make an helpful message for publishing.
Not for copying that message over the other repos which won't have to publish the same information/commits.
Using
branch.$name.description
as the configuration key, give users a place to write about what the purpose of the branch is and things like that, so that various subsystems, e.g. "push -s
", "request-pull
", and "format-patch --cover-letter
", can later be taught to use this information.
Update 2020 (8 years later):
philb mentions in the comments the issue gitgitgadget/git
438 about "Branch descriptions should be versionable".
philb adds:
If this is ever implemented, branch descriptions would be stored in refs and could then be pushed to a remote.
This seems like a fairly recent git feature and may not be well supported yet. Take a look at the README feature, Branch descriptions in git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With