Skip to content

Instantly share code, notes, and snippets.

@jjosef
Created September 15, 2016 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjosef/5c8131e270f8d60ffafc71146f1e6a68 to your computer and use it in GitHub Desktop.
Save jjosef/5c8131e270f8d60ffafc71146f1e6a68 to your computer and use it in GitHub Desktop.
# place in ~/.bashrc
# if on OSX put [ -r ~/.bashrc ] && source ~/.bashrc in ~/.bash_profile
function first_git() {
git init
git add -A :/
git commit -m "first commit"
git remote add origin $1
git push -u origin master
}
# Usage: first_git <remote_repo.git>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment