Skip to content

Instantly share code, notes, and snippets.

@big-kahuna-burger
Created August 9, 2016 09:54
Show Gist options
  • Save big-kahuna-burger/94622f541248249b91f248815abd188b to your computer and use it in GitHub Desktop.
Save big-kahuna-burger/94622f541248249b91f248815abd188b to your computer and use it in GitHub Desktop.
import git, os, shutil
DIR_NAME = "temp"
REMOTE_URL = "https://github.com/hasinhayder/LightBulb.git"
if os.path.isdir(DIR_NAME):
shutil.rmtree(DIR_NAME)
os.mkdir(DIR_NAME)
repo = git.Repo.init(DIR_NAME)
origin = repo.create_remote('origin',REMOTE_URL)
origin.fetch()
origin.pull(origin.refs[0].remote_head)
print "---- DONE ----"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment