Created
March 8, 2013 16:59
-
-
Save marka2g/5117963 to your computer and use it in GitHub Desktop.
Quickly Host a Git Repo - From Gray
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
# **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