gh pr create - need help #9517
Replies: 3 comments
|
I used gh repo command in lieu of gh create pr to resolve - however feedback would be appreciated |
|
If gh pr create --repo orga/test_abc --base development --head david_abc:developmentThat lines up with the current help syntax: where:
So in your case:
If you are already inside the fork checkout on the correct branch and the remote setup is clean, |
|
If you want commit messages in the PR descriptionCollect them when you push: # Show commits on this branch vs main
git log main..HEAD --pretty=format:"- %s (%h)"
# Pipe into PR body
gh pr create --title "feat: my change" --body "$(git log main..HEAD --pretty=format:'- %s (%h)')"If you want to edit commit messages before opening the PRUse interactive rebase before git rebase -i main
# mark commits as 'reword', save, edit each message
git push --force-with-lease
gh pr createIf the editor opens but feels emptySet your editor explicitly: gh config set editor "code --wait" # VS Code
# or
$env:EDITOR = "notepad" # PowerShell sessionCommon mistake on WindowsRunning |
Uh oh!
There was an error while loading. Please reload this page.
Organization: orga
Repo1: test_abc
Branch: development
Repo2: david_abc
Repo2 is a for of Repo1
Branch: development
Changes have been made in Repo2 and it shows that it has Commits in github.com that can be submitted as Pull to Update Repo1 (parent of repo2)
I am trying to submit the gh create pr from the command line in Windows (trying to make this part of a large process for a team so I know I can go to github open repo2 and create the pull request there wihtout issue) I am wanting to do the equivalent via the command line in windows.
c:\git\repo2> what should be the gh pr create statement that i should put here - tried every combination I can think of.
I have already ran gh auth login and validated with gh auth status.
All reactions