Skip to content

Instantly share code, notes, and snippets.

@rajasimon
Last active August 29, 2015 14:04
Show Gist options
  • Save rajasimon/50beeb1867638bd3b222 to your computer and use it in GitHub Desktop.
Save rajasimon/50beeb1867638bd3b222 to your computer and use it in GitHub Desktop.
Git
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 {} \;
@rajasimon
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment