Skip to content
Discussion options

You must be logged in to vote

i also had the same doubt ...this is the workflow i used ...i hope it helps you

Step Command(s) Description
1. Check main is updated git checkout main Switch to the main branch and pull the latest changes from the remote.
git pull origin main
2. List and fetch PR gh pr list List open PRs, fetch PR #2 into a local branch pr-2, and switch to it.
git fetch origin pull/2/head:pr-2
git checkout pr-2
3. Rebase PR on latest main git rebase main Update the PR branch with the latest changes from main.
4. Merge PR branch into main git checkout main Merge the rebased PR branch into your main branch.
git merge pr-2
5. Check differences git diff main..pr-2 Review changes…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Komal199824
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pull Requests Propose, review, and discuss changes to a repository's codebase Question Ask and answer questions about GitHub features and usage
3 participants