Skip to content

Extracting the original FreeBSD branch name when using a local branch? #87

@Ximalas

Description

@Ximalas

I use a local branch to keep track of my own stuff, kernel configuration files and one firstboot script.

When I ask Git which branch is checked out, I get the name of my own branch, local. Is there a Git command for extracting the name of the branch of which the local branch was rebased on?

The name of local branch will also be part of the kernel's identification. What are the pros and cons of naming a local branch as main+local or stable/13+local? All forward slashes and plus signs must be changed to, say, dashes when used as part of ZFS filesystem and snapshot names.

When stable/14 comes to light, I imagine this sequence:

cd /usr/src
# Already on the stable/13+local branch.
git checkout -b stable/14+local
# It's not a given that stable/14 is known to the local repo.
# And it's not a given that I know what I'm talking about.
git checkout stable/13
git pull --no-edit --no-ff
git checkout stable/14
git rebase stable/14 stable/14+local
# Fixup any files.
git add ...
git commit

Any later update proceeds as usual:

cd /usr/src
git checkout stable/14
git pull --no-edit --no-ff
git rebase stable/14 stable/14+local

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions