By Christopher M. Judd (javajudd@gmail.com)
- http://git-scm.com/book/en
- http://java.dzone.com/articles/some-notes-git
- http://gitolite.com/gitolite/sts.html
- http://gitimmersion.com/
- https://tapajyoti-bose.medium.com/git-cheat-sheet-with-40-commands-concepts-ab1b9d973e96
- http://training.github.com/presentations/git-foundations.html#/
- http://nvie.com/posts/a-successful-git-branching-model/
- https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow
- https://spin.atomicobject.com/2016/06/26/parallelize-development-git-worktrees/
- https://dev.to/yankee/practical-guide-to-git-worktree-58o0
git init <directory>
git clone <repo url>
git add <file>
git add .
git status
git commit -m "<message>"
git commit -a -m "<message>"
git commit -am "<message>"
git commit <commit id>
git revert <commit id>
git reset <commit id>
git reset --hard <commit id>
git reset --hard origin/master
git restore <file>
git restore --staged <file>
git mv <current path> <new path>
git rm <file>
git rm --cached <file>
git branch
git branch -r
git branch -a
git branch -v
git branch <branch>
git checkout -b <branch>
git switch <branch>
git checkout <branch>
git branch -D <branch>
git push origin --delete <branch>
git merge <branch to merge into head>
Creates a merge commit even if the merge resolves as a fast-forward.
git merge --no-ff <branch to merge into head>
Squashes all commits from branch into a single commit.
git merge --squash <branch to merge into head>
git rebase <branch to rebase from>
git log
git log --stat
git log -p
git log --oneline -10
git log --oneline -10
git log --pretty=oneline
git reflog -10
git log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
git diff
git diff --staged
git diff <commit id 1> <commit id 2>
git stash
git stash save "<message>"
git stash list
git stash apply <id>
git stash apply stash@{<index>}
git stash pop
git stash pop <stash id>
git stash show <stash id>
git stash drop <stash id>
git stash clear
git remote add <remote alias> <url>
git remote add origin <url>
git remote
git remote -v
git remote show <alias>
git config --get remote.origin.url
git remote rm <remote alias>
git remote rename <old alias> <new alias>
git fetch
git fetch <remote alias>
git fetch <remote alias> <branch>
git pull
git pull <remote alias> <branch>
git pull --rebase
git push
git push <remote alias>
git push <remote alias> <branch>
git tag
git tag -a <tag name> -m '<label>'
git push --tags
git tag -d <tag>
git push origin :refs/tags/<tag>
git checkout -b <new branch name> <tag>
git switch <branch>
git checkout -t origin/<feature>/<feature num>
git checkout -t origin/feature/<feature num>
git branch -m <oldname> <newname>
git blame <file>
git show <commit id>:<file>
git reset --soft HEAD~
git reset HEAD
git add .
git commit --amend
git update-index --assume-unchanged path/to/file
git update-index --no-assume-unchanged path/to/file
git diff --staged
git diff --name-status master..<branch>
git format-patch <parent branch>
git am < <patch file>
git bundle create <repo>.bundle master
git clone <repo>.bundle -b master <bundle>
git config --list
git config --global user.name "[name]"
git config --global user.email "[email address]"
git config --global color.ui auto
git reset ea5a181
git reset --soft <sha>
git commit -m "Revert to <sha>"
git reset --hard
git clean -f -d
git push -f origin <branch name>
git cherry-pick <commit sha>
git ls-files --other --ignored --exclude-standard
git branch --contains <sha>
git log -p <branch1> --not <branch2>
ssh git@<server> info
git worktree list
git fetch
git branch <branch> origin/<branch>
git worktree add <tree dir> <branch>
git worktree remove <tree dir>
git flow feature
git flow feature start <name> [<base>]
git flow feature finish <name>
git flow feature publish <name>
git flow feature pull <remote> <name>
git flow feature pull origin <name>
git flow release
git flow release start <release> [<base>]
git flow release finish <release>
git flow hotfix
git flow hotfix start <release> [<base>]
git flow hotfix finish <release>
git flow support
git flow support start <release> <base>
git clone --mirror <repo url> temp-dir
cd temp-dir
git tag
git branch -a
git remote rm origin
git remote add origin <new repo url>
git push origin --all
git push --tags
https://stackoverflow.com/questions/11792671/how-to-git-bundle-a-complete-repo
git clone --mirror git@example.org:path/repo.git
git bundle create repo.bundle --all