References :
Setting up a global .gitignore for Python projects on Mac OS X - Guido van Oorschot
$ wget https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore -O ~/Python.gitignore$ git config --global core.excludesfile ~/Python.gitignore
https://github.com/Username/Repository/tree/master/subdirectory | v svn checkout https://github.com/Username/Repository/trunk/subdirectory
$ git filter-branch --index-filter 'git rm --cached --ignore-unmatch -rf dir1 dir2 dirN file1 file2 fileN' --prune-empty -f HEAD
References :
How to remove previously added git subtree and its history - Stack Overflow
$ git config --bool receive.denyCurrentBranch false
$ vi .git/hooks/post-receive
# Update working tree after receiving pushed branch
echo "*****************************************************"
echo "Post-receive hook: updating remote working directory"
echo "*****************************************************"
cd ..env -i git reset --hard
$ chmod +x .git/hooks/post-receive
$ export GIT_SSL_NO_VERIFY=true
$ git clone https://github.com/pozgo/docker-snmpd.git/
$ git push origin --delete
$ git remote show
origin
test
$ git config --get remote.origin.url
$ git config --get remote.test.url
$ git checkout -b < new_branch > origin/< new_branch >
fatal: git checkout: updating paths is incompatible with switching branches/forcing
Did you intend to checkout ‘origin/‘ which can not be resolved as commit?’
$ git pull
$ git diff > patch
$ git diff --cached > patch
$ git diff branchname --cached > patch
$ git apply --check patch
$ git apply patch
$ mkdir aaa
$ cd aaa
$ vi .gitignore
# Ignore everything in this directory * # Except this file !.gitignore
$ git init
$ git config receive.denyCurrentBranch ignore
$ mv post-update .git/hooks
$ git remote add prod ssh://git@deploy-server:22/var/www/myproject
$ git log -p file
$ git show --pretty="format:" --no-commit-id --name-only d7196058
$ git config receive.denyCurrentBranch ignore
or
$ git config --global receive.denyCurrentBranch ignore
$ git clone ssh://yanxen.no-ip.org/my_project.git --branch branch_name
$ cd my_project
$ git pull origin branch_name