Skip to content

Instantly share code, notes, and snippets.

@daisyUniverse
Created February 28, 2021 22:31
Show Gist options
  • Save daisyUniverse/92cb07f9af589a9e98ca1ad042de9238 to your computer and use it in GitHub Desktop.
Save daisyUniverse/92cb07f9af589a9e98ca1ad042de9238 to your computer and use it in GitHub Desktop.
Quickly initialize a git repo and push everything to a remote
#!/bin/bash
# Save to /usr/bin for maximum ease of use
# $ gitinit username reponame
git init
git add .
git commit -m "too init to quit"
git branch -M main
git remote add origin https://github.com/"$1"/"$2".git
git push -u origin main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment