Created
September 5, 2022 18:33
-
-
Save jaraco/ec08056b5568646207971b755d189889 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
draft $ gh repo create --public issue1717562-2 --clone | |
✓ Created repository jaraco/issue1717562-2 on GitHub | |
Initialized empty Git repository in /Users/jaraco/draft/issue1717562-2/.git/ | |
draft $ cd issue1717562-2 | |
issue1717562-2 main $ touch README.md | |
issue1717562-2 main $ git add README.md | |
issue1717562-2 main $ git commit -a -m "Add README" | |
[main (root-commit) 4536963] Add README | |
1 file changed, 0 insertions(+), 0 deletions(-) | |
create mode 100644 README.md | |
issue1717562-2 main $ git push | |
fatal: The current branch main has no upstream branch. | |
To push the current branch and set the remote as upstream, use | |
git push --set-upstream origin main | |
To have this happen automatically for branches without a tracking | |
upstream, see 'push.autoSetupRemote' in 'git help config'. | |
issue1717562-2 main $ gpo | |
Enumerating objects: 3, done. | |
Counting objects: 100% (3/3), done. | |
Writing objects: 100% (3/3), 868 bytes | 868.00 KiB/s, done. | |
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 | |
To https://github.com/jaraco/issue1717562-2.git | |
* [new branch] main -> main | |
branch 'main' set up to track 'origin/main'. | |
issue1717562-2 main $ git checkout -b feature1 | |
Switched to a new branch 'feature1' | |
issue1717562-2 feature1 $ cat > foo.txt | |
abc | |
123 | |
issue1717562-2 feature1 $ git add foo.txt | |
issue1717562-2 feature1 $ git commit -a -m "Implement foo" | |
[feature1 6534929] Implement foo | |
1 file changed, 2 insertions(+) | |
create mode 100644 foo.txt | |
issue1717562-2 feature1 $ gh pr create | |
? Where should we push the 'feature1' branch? jaraco/issue1717562-2 | |
Creating pull request for feature1 into main in jaraco/issue1717562-2 | |
? Title Implement foo | |
? Body <Received> | |
? What's next? Submit | |
remote: | |
remote: | |
To https://github.com/jaraco/issue1717562-2.git | |
* [new branch] HEAD -> feature1 | |
branch 'feature1' set up to track 'origin/feature1'. | |
https://github.com/jaraco/issue1717562-2/pull/1 | |
issue1717562-2 feature1 $ git checkout -b feature2 | |
Switched to a new branch 'feature2' | |
issue1717562-2 feature2 $ rm foo.txt | |
issue1717562-2 feature2 $ touch foo.txt | |
issue1717562-2 feature2 $ cat > bar.txt | |
Bar now replaces the behavior in foo. | |
issue1717562-2 feature2 $ git add bar.txt | |
issue1717562-2 feature2 $ git commit -a -m "Bar replaces foo's implementation." | |
[feature2 eb100b6] Bar replaces foo's implementation. | |
2 files changed, 1 insertion(+), 2 deletions(-) | |
create mode 100644 bar.txt | |
issue1717562-2 feature2 $ gh pr create --base feature1 | |
? Where should we push the 'feature2' branch? jaraco/issue1717562-2 | |
Creating pull request for feature2 into feature1 in jaraco/issue1717562-2 | |
? Title Bar replaces foo's implementation. | |
? Body <Received> | |
? What's next? Submit | |
remote: | |
remote: | |
To https://github.com/jaraco/issue1717562-2.git | |
* [new branch] HEAD -> feature2 | |
branch 'feature2' set up to track 'origin/feature2'. | |
https://github.com/jaraco/issue1717562-2/pull/2 | |
issue1717562-2 feature2 $ gh pr merge 1 | |
? What merge method would you like to use? Squash and merge | |
? Delete the branch locally and on GitHub? Yes | |
? What's next? Submit | |
✓ Squashed and merged pull request #1 (Implement foo) | |
✓ Deleted branch feature1 | |
issue1717562-2 feature2 $ gh pr status | |
Relevant pull requests in jaraco/issue1717562-2 | |
Current branch | |
#2 Bar replaces foo's implementation. [feature2] - Closed | |
Created by you | |
You have no open pull requests | |
Requesting a code review from you | |
You have no pull requests to review |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment