Created
September 27, 2011 01:52
-
-
Save jharjono/1244102 to your computer and use it in GitHub Desktop.
Create git servers on CDF
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
#!/bin/bash | |
# This script creates a git repository on your local machine and your CDF account and links them together | |
# Set up env | |
REPO_NAME=myproj # or $1 if you want to run this script often | |
CDF_NAME=g1someone | |
SERVER=redwolf.cdf.toronto.edu | |
# Creating the project | |
mkdir $REPO_NAME | |
cd $REPO_NAME | |
git init | |
# git does not seem to like empty repositories | |
touch README | |
git add README | |
git commit -m "initial commit" | |
# Create the bare git repo | |
cd .. | |
git clone --bare $REPO_NAME ${REPO_NAME}.git | |
# now move it to CDF | |
scp -r ${REPO_NAME}.git ${CDF_NAME}@${SERVER}:~/ | |
# and it's live! | |
cd /tmp | |
git clone ${CDF_NAME}@${SERVER}:~/${REPO_NAME}.git ${REPO_NAME}-clone | |
# now you can go to the clone, commit, pull, push, etc |
duly noted, thanks @meatcar!
They actually let us create GIT repository?
isn't it wonderful?
…On Tue, Sep 27, 2011 at 9:22 PM, Joseph Yeung < ***@***.***>wrote:
They actually let us create GIT repository?
##
Reply to this email directly or view it on GitHub:
https://gist.github.com/1244102
Good job Johan, it's very helpful! thanks @jharjono
Yep is wonderful. Last time I checked CDF blocked almost everything, but I guess git can use the https ports
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should probably include a #!/bin/... at the top.