Don't get the entire history
# get the truncated history:
git clone --depth 1
# or no checkout
git clone -n
# get only one branch:
git clone --branch NAME
Merge without a commit:
git merge v1.0 --no-commit --no-ff
git bisect start
# test
git bisect good / bad
git rebase HEAD~3 -i
transplant:
git rebase --onto NEW_REF_BRANCH OLD_REF_BRANCH CURRENT_BRANCH
git subtree add --prefix /some/prefix GIT_URL BRANCH_NAME
# Init working copy
git init .
# Add remote origin
git remote add origin GIT_URL
# Enable sparse checkout
git config core.sparseCheckout true
echo 'FOLDER' > .git/info/sparse-checkout
git pull origin master
if we change .git/info/sparse-checkout:
git read-tree -m -u HEAD
git reset --hard HEAD~1
to revert
git reflog
git reset --hard COMMITID