Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blog: git twofer #20

Open
srl295 opened this issue Jan 31, 2024 · 0 comments
Open

blog: git twofer #20

srl295 opened this issue Jan 31, 2024 · 0 comments

Comments

@srl295
Copy link
Member

srl295 commented Jan 31, 2024

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant