-
-
Save big-kahuna-burger/94622f541248249b91f248815abd188b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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