Created
September 19, 2012 23:20
-
-
Save codearmorygists/3752986 to your computer and use it in GitHub Desktop.
Gitdrop: add file to Github Page, push to web, and put URL into clipboard
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 | |
DIR="/Path/to/gh-pages/repo" # Path to gh-pages repo | |
URL="http://website.com" # Domain and path to where the GitHub Page lives on the web | |
BASE=`basename $1` | |
cp $1 $DIR | |
cd $DIR | |
git add $BASE | |
git commit -m "$BASE added" | |
git push origin gh-pages | |
echo "$URL/$BASE" | pbcopy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment