Skip to content

Instantly share code, notes, and snippets.

@jaraco
Last active September 5, 2022 18:20
Show Gist options
  • Select an option

  • Save jaraco/bde629042be4392de6944f2b8c865fa8 to your computer and use it in GitHub Desktop.

Select an option

Save jaraco/bde629042be4392de6944f2b8c865fa8 to your computer and use it in GitHub Desktop.
draft $ gh repo create --public issue1717562 --clone
✓ Created repository jaraco/issue1717562 on GitHub
Initialized empty Git repository in /Users/jaraco/draft/issue1717562/.git/
draft $ cd issue1717562/
issue1717562 main $ touch README.md
issue1717562 main $ git add README.md
issue1717562 main $ git commit -a -m "Add README"
[main (root-commit) 09c719e] Add README
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 README.md
issue1717562 main $ gpo
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 866 bytes | 866.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/jaraco/issue1717562.git
* [new branch] main -> main
branch 'main' set up to track 'origin/main'.
issue1717562 main $ git checkout -b feature1
Switched to a new branch 'feature1'
issue1717562 feature1 $ cat > foo.txt
abc
123
issue1717562 feature1 $ git add foo.txt
issue1717562 feature1 $ git commit -m "Initialize the foo feature"
[feature1 48d86fb] Initialize the foo feature
1 file changed, 2 insertions(+)
create mode 100644 foo.txt
issue1717562 feature1 $ gpo
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 953 bytes | 953.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote:
remote: Create a pull request for 'feature1' on GitHub by visiting:
remote: https://github.com/jaraco/issue1717562/pull/new/feature1
remote:
To https://github.com/jaraco/issue1717562.git
* [new branch] feature1 -> feature1
branch 'feature1' set up to track 'origin/feature1'.
issue1717562 feature1 $ gh pr create
Creating pull request for feature1 into main in jaraco/issue1717562
? Title Introducing foo
? Body <Received>
? What's next? Submit
https://github.com/jaraco/issue1717562/pull/1
issue1717562 feature1 $ git checkout -b feature2
Switched to a new branch 'feature2'
issue1717562 feature2 $ rm foo.txt
issue1717562 feature2 $ touch foo.txt
issue1717562 feature2 $ git commit -a -m "Removing lines from foo, no longer needed."
[feature2 5096635] Removing lines from foo, no longer needed.
1 file changed, 2 deletions(-)
issue1717562 feature2 $ gpo
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 933 bytes | 933.00 KiB/s, done.
Total 2 (delta 0), reused 0 (delta 0), pack-reused 0
remote:
remote: Create a pull request for 'feature2' on GitHub by visiting:
remote: https://github.com/jaraco/issue1717562/pull/new/feature2
remote:
To https://github.com/jaraco/issue1717562.git
* [new branch] feature2 -> feature2
branch 'feature2' set up to track 'origin/feature2'.
issue1717562 feature2 $ gh pr create --base feature1
Creating pull request for feature2 into feature1 in jaraco/issue1717562
? Title Remove lines from foo
? Body <Received>
? What's next? Submit
https://github.com/jaraco/issue1717562/pull/2
issue1717562 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 (Introducing foo)
✓ Deleted branch feature1
issue1717562 feature2 $ git pull
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 2 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 670 bytes | 223.00 KiB/s, done.
From https://github.com/jaraco/issue1717562
09c719e..66d2ff0 main -> origin/main
Already up to date.
issue1717562 feature2 $ git pull --prune
From https://github.com/jaraco/issue1717562
- [deleted] (none) -> origin/feature1
Already up to date.
issue1717562 feature2 $ gh pr status
Relevant pull requests in jaraco/issue1717562
Current branch
#2 Remove lines from foo [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