File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ @ echo off
2+
3+ set /p original_repo_url = " Enter the URL of the original repository: "
4+ set /p pull_request_number = " Enter the pull request number: "
5+
6+ REM Step 1: Ensure your fork is up to date
7+ git remote add upstream " %original_repo_url% "
8+ git fetch upstream
9+ git checkout main
10+ git merge upstream/main
11+
12+ REM Step 2: Apply the changes locally
13+ git checkout main
14+ git pull origin main
15+ git checkout -b pr-branch
16+ git pull " %original_repo_url% " " pull/%pull_request_number% /head"
17+
18+ REM Step 4: Resolve conflicts (if any)
19+ REM Handle conflicts manually in the code editor
20+
21+ REM Step 5: Commit the changes
22+ set /p commit_message = " Enter a commit message for the merge: "
23+ git add .
24+ git commit -m " %commit_message% "
25+
26+ REM Step 6: Push the changes to your fork
27+ git push origin pr-branch
28+
29+ REM Step 7: Create a pull request in your fork
30+ echo .
31+ echo To complete the process, go to your fork's repository on GitHub
32+ echo and create a pull request for the 'pr-branch' branch.
You can’t perform that action at this time.
0 commit comments