6 ms·
"How can I find out which branch each parent was originally made on" -- ouch. Ive dreamed of automatically tacking on branch names to commit messages to solve
by mooneater 10y ago
"How can I find out which branch each parent was originally made on" -- ouch. Ive dreamed of automatically tacking on branch names to commit messages to solve this very issue.
- an_account 10y agoAs long as the branch hasn't been deleted, it's possible to figure out based on the commits, correct? (Not exactly easy, but possible.) And if the branch has been deleted, which typically happens after merging, then there's not much reason to know the branch name. Is there something I'm missing here?
- KayEss 10y ago> then there's not much reason to know the branch name Most likely the branch names give you a good deal of information in working out why things have happened.
- mooneater 10y agoThis
- qznc 10y agoThat information should be in the merge commit message. If you merge something git will offer you a default commit message like "Merge branch 'foo'". (assuming a non-fast-forward commit, where the branch is not really a branch because nothing happens in parallel)
- lmm 10y agoSo can I ask git to show me the merge commit that relates to the commit I'm looking at?
- Vinkekatten 10y agoWe use Jira and bitbucket - most if not all branch names contain an issue number and the name of the issue, while commit messages can be more cryptic. This is often helpful when the branch has been deleted, as it usually is.
- Vinkekatten 10y agoWe use bitbucket server for pull requests and merges, and it does this. It's brilliant, since the branch name often describes the solved problem better than the commit messages.
- geezerjay 10y ago> Ive dreamed of automatically tacking on branch names to commit messages to solve this very issue. I believe mercurial does this by default. Why not give it a try?