Skip to content

blog: git twofer #20

Open
Open
@srl295

Description

@srl295

BTW I said I wanted to make some tools to help w/ the chained PRs we do here. It’s even on the December TODO list from last year (Was that really a year ago?)

Here’s something - doesn't run inside git itself

alias gh-baseRefName="gh pr view --json baseRefName | jq -r .baseRefName"
alias gh-baseRef='echo $(git remote)/$(gh-baseRefName)'

then:

$ gh-baseRefName
feat/core/9707-tertiary-reorder-epic-ldml
$ gh-baseRef
upstream/feat/core/9707-tertiary-reorder-epic-ldml

thus to merge in the latest base of this PR: (same as the ‘update’ button)

$ git fetch && git merge $(gh-baseRef)

Or, more dangerously

git rebase -i $(gh-baseRef)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions