Today I Learned

hashrocket A Hashrocket project

Push commits with repo creation using Github CLI

When creating a GitHub repo with the CLI tool, you have the opportunity to push up your commits immediately as well using the --push or (-p)

❯ gh repo create OWNER/REPO --push --source .
✓ Created repository OWNER/REPO on GitHub
✓ Added remote

Using the push flag requires the --source flag to tell it where the repo is locally which is why you see that in the example above.

See More #git TILs