-
-
Save rajasimon/50beeb1867638bd3b222 to your computer and use it in GitHub Desktop.
Git
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
git clone http;//github.com/rajasimon/panaface | |
git init | |
git add . | |
git commit. -m "Added something here" | |
git push -u origin master | |
git checkout -b [name_of_your_new_branch] | |
git branch -d <branch name> # to delete local branch | |
git push origin :<branch name> # to delete remote | |
or | |
git push origin -delete <branch_name> | |
$ mkdir /var/www/www.example.org | |
$ cat > hooks/post-receive | |
#!/bin/sh | |
GIT_WORK_TREE=/var/www/www.example.org git checkout -f | |
$ chmod +x hooks/post-receive | |
$ git remote add web ssh://server.example.org/home/ams/website.git | |
$ git push web +master:refs/heads/master | |
for commited files | |
git reset --hard | |
for modified files | |
git clean -fd | |
find . -name "*.pyc" -exec git rm -f {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://toroid.org/ams/git-website-howto