Skip to content

Instantly share code, notes, and snippets.

@hubgit
Created May 30, 2012 11:50
Show Gist options
  • Save hubgit/2835770 to your computer and use it in GitHub Desktop.
Save hubgit/2835770 to your computer and use it in GitHub Desktop.
GitHub repository initialisation, for an existing directory
#! /bin/sh
GITHUB_REPO="oai-html" # edit this
GITHUB_USER="hubgit" # edit this
git init
git remote add origin git@github.com:$GITHUB_USER/$GITHUB_REPO.git
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
git pull
git add .
git commit -a -m "first import"
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment