commit
무료Create a conventional commit for PX4 changes
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Rebase a branch onto main, handling squash-merged parent branches cleanly
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
실행 점수 미검증
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Rebase the current (or specified) branch onto main, correctly handling the case where the branch was built on top of another branch that has since been squash-merged into main.
When a parent branch is squash-merged, its individual commits become a single new commit on main with a different hash. A normal git rebase main will try to replay the parent's original commits, causing messy conflicts. The fix is to cherry-pick only the commits unique to this branch onto a fresh branch from main.
Identify the branch. Use $ARGUMENTS if provided, otherwise use the current branch.
Fetch and update main:
git fetch origin main:main
Find the merge base between the branch and main:
git merge-base <branch> main
List all commits on the branch since the merge base:
git log --oneline <merge-base>..<branch>
Identify which commits are unique to this branch vs. inherited from a parent branch. Look for:
main that correspond to a group of commits at the bottom of the branch's history (check PR titles, commit message keywords).git rebase main and skip the rest.Create a fresh branch from main:
git checkout -b <branch>-rebase main
Cherry-pick only the unique commits (oldest first):
git cherry-pick <first-unique-commit>^..<branch>
The A^..B range means "from the parent of A through B inclusive."
Handle conflicts if any arise during cherry-pick. Resolve and git cherry-pick --continue.
Replace the old branch:
git branch -m <branch> <branch>-old
git branch -m <branch>-rebase <branch>
Verify the result:
git log --oneline main..<branch>
Confirm only the expected commits are present.
Ask the user before force-pushing. When approved:
git push origin <branch> --force-with-lease
Clean up the old branch:
git branch -D <branch>-old
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Create a conventional commit for PX4 changes
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Create a pull request with conventional commit title and description
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Review a pull request with structured, domain-aware feedback
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.