Skip to content

Instantly share code, notes, and snippets.

@alterisian
Created September 3, 2025 11:27
Show Gist options
  • Select an option

  • Save alterisian/fbeea6fe45895acdbc29ce786f433ad9 to your computer and use it in GitHub Desktop.

Select an option

Save alterisian/fbeea6fe45895acdbc29ce786f433ad9 to your computer and use it in GitHub Desktop.
What if instead of just git init, we added all the files, and an initial commit, and created the repo on github?
#!/bin/bash
set -e
project_name=$(basename "$PWD")
git init
git add .
git commit -m "initial commit of $project_name"
gh repo create "$project_name" --private --source=. --remote=origin --push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment