Last active
December 14, 2015 14:39
-
-
Save gmanley/5102114 to your computer and use it in GitHub Desktop.
Quickly Host a Git Repository
This file contains hidden or 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
# **Quickly Host a Git Repository** | |
REPO_ROOT='~/source/repos' # Can be anywhere | |
GIT_PROJECT_PATH='~/projects/my_cool_git_project' # Your local project using git | |
GIT_PROJECT_NAME=$(basename $GIT_PROJECT) | |
mkdir -p $REPO_ROOT | |
cd $REPO_ROOT | |
git clone --bare $GIT_PROJECT_PATH | |
cd $GIT_PROJECT_NAME.git | |
git update-server-info | |
cd - | |
python -m SimpleHTTPServer | |
# Give someone the url to clone it: | |
git clone http://grays-imac.local:8000/my_cool_git_project.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using the builtin python web server here as its simple to start up, however any http web server will work.