export GIT_TRACE=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
git clean --dry-run
git clean -f -q
git reset --hard
git reset --hard origin/master
git reset --hard HEAD~1
git checkout -t origin/develop
git remote prone origin
git branch -D origin/release/2018.05.00.12-test
git push origin --delete release/2018.05.00.12-test
git gc --prune=now
git fetch --prune
git branch -d release-6.9.0
git branch -d -f release-6.9.0
git rev-parse "remotes/origin/release-6.0.0"
git branch --all --contains 0ff27c79738a6ed718baae3e18c74ba87f16a314
git branch --all --contains {name-of-the-branch}
git branch --all --merged 0ff27c79738a6ed718baae3e18c74ba87f16a314
git log -5 develop
git log -5 develop --name-only
git log --all --graph --decorate --oneline --simplify-by-decoration
git branch --no-merged
git checkout -t remotes/origin/release
git checkout experiment -- deployment/connection_pool.py
git config --global user.name "vitalii cherkashyn"
git config --global user.email [email protected]
git config --global --list
git config --global credential.helper store
git config --system --unset credential.helper
git config --global --unset credential.helper
git branch --all --merged "release" --verbose
git branch --all --no-merged "release" --verbose
git branch -vv
git diff --name-status develop release-6.0.0
git cherry develop release-6.0.0
git diff develop..master -- myfile.cs
git rev-list master..search-client-solr
git fetch --all --prune
git log --all --grep "BCM-642"
git rev-parse HEAD
git log --all -- "**db-update.py"
git log --all -- db-scripts/src/main/python/db-diff/db-update.py
git diff-tree --no-commit-id --name-only -r 6dee1f44f56cdaa673bbfc3a76213dec48ecc983
git fetch --all
git diff HEAD..origin/develop
git show 143243a3754c51b16c24a2edcac4bcb32cf0a37d -- db-scripts/src/main/python/db-diff/db-update.py
git diff {hash}~ {hash}
git revert <commit>
git commit --amend -m "<new message>"
git log --pretty=format:"%h - %an, %ar : %s" <commit SHA> -1
git --git-dir C:\project\horus\.git branch --all
git remote -v
git remote set-url origin [email protected]:adp/data-management.git
if during the access ( clone, pull ) issue appear:
fatal: unable to access 'http://localhost:3000/vitalii/sensor-yaml.git/': The requested URL returned error: 407
or
fatal: unable to access 'http://localhost:3000/vitalii/sensor-yaml.git/': The requested URL returned error: 503
use next command to 'simulate' cloning
git clone http://localhost:3000/vitalii/sensor-yaml.git
< equals >
wget http://localhost:3000/vitalii/sensor-yaml.git/info/refs?service=git-upload-pack
git clone --depth 1 https://github.com/kubernetes/minikube
git archive --remote=ssh://https://github.com/cherkavi/cheat-sheet HEAD jenkins.md
git remote update origin --prune
git tag -a $newVersion -m 'deployment_jenkins_job'
git push --tags $remoteUrl
echo 'deb http://http.debian.net/debian wheezy-backports main' > /etc/apt/sources.list.d/wheezy-backports-main.list
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install
git lfs pull
if you are using SSH access to git, you should specify http credentials ( lfs is using http access ), to avoid possible errors: "Service Unavailable...", "Smudge error...", "Error downloading object"
git config --global credential.helper store
file .gitconfig will have next section
[credential]
helper = store
file ~/.git-credentials ( default from previous command ) should contains your http(s) credentials
https://username:[email protected]
https://username:[email protected]
be aware about upper case for environment variables
NO_PROXY=localhost,127.0.0.1,.localdomain,.advantage.org
HTTP_PROXY=muc.proxy
HTTPS_PROXY=muc.proxy
git config --global http.proxy 139.7.95.74:8080
git config --global https.proxy 139.7.95.74:8080
git config --global --get http.proxy
git config --global --unset http.proxy
git config core.sshCommand 'ssh -i private_key_file'
.gitattributes
*.sh -crlf
curl -s https://api.github.com/repos/bugy/script-server/releases/latest | grep browser_download_url | cut -d '"' -f 4
wget https://raw.githubusercontent.com/cherkavi/cheat-sheet/master/git.md
#git settings parse_git_branch() {
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\033[32m\]\W\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
mv .git/hooks/commit-msg.sample .git/hooks/commit-msg
result=`cat $1 | grep "^check-commit"`
if [ "$result" != "" ]; then
exit 0
else
echo "message should start from 'check-commit'"
exit 1
fi