Git - Core

232 commands

git initgit init myprojectgit clone https://github.com/user/repo.gitgit clone --depth 1 https://github.com/user/repo.gitgit clone -b main https://github.com/user/repo.gitgit statusgit status -sgit add file.txtgit add .git add -Agit add -pgit add -ugit commit -m 'message'git commit -am 'message'git commit --amendgit commit --amend --no-editgit commit --allow-empty -m 'trigger CI'git push origin maingit push -u origin maingit push --force-with-leasegit push origin --delete feature-branchgit push --tagsgit pullgit pull --rebasegit pull origin maingit fetchgit fetch origingit fetch --allgit fetch --prunegit branchgit branch -agit branch -rgit branch feature-xyzgit branch -m old-name new-namegit branch -d feature-xyzgit branch -D feature-xyzgit checkout feature-xyzgit checkout -b feature-xyzgit checkout -- file.txtgit switch maingit switch -c feature-xyzgit restore file.txtgit restore --staged file.txtgit merge feature-xyzgit merge --no-ff feature-xyzgit merge --squash feature-xyzgit merge --abortgit rebase maingit rebase -i HEAD~3git rebase --onto main feature basegit rebase --abortgit rebase --continuegit stashgit stash push -m 'WIP: feature'git stash popgit stash apply stash@{2}git stash listgit stash drop stash@{0}git stash cleargit stash branch feature-xyz stash@{0}git loggit log --onelinegit log --oneline --graph --allgit log -pgit log -n 10git log --author='Alice'git log --since='2 weeks ago'git log --grep='bugfix'git log -- file.txtgit diffgit diff --stagedgit diff main featuregit diff HEAD~1 HEADgit show abc1234git show HEAD:file.txtgit tag v1.0.0git tag -a v1.0.0 -m 'Release 1.0.0'git tag -d v1.0.0git remote -vgit remote add origin https://github.com/user/repo.gitgit remote set-url origin https://github.com/user/repo.gitgit remote remove origingit config user.name 'Your Name'git config user.email 'you@example.com'git config --global core.editor vimgit blame file.txtgit blame -L 10,20 file.txtgit bisect startgit bisect good abc1234git bisect bad HEADgit bisect resetgit cherry-pick abc1234git cherry-pick abc1234..def5678git reset --soft HEAD~1git reset --mixed HEAD~1git reset --hard HEAD~1git revert abc1234git revert HEADgit clean -fdgit clean -ngit archive --format=zip HEAD > archive.zipgit init --bare myrepo.gitgit clone --mirror https://github.com/expressjs/express.gitgit clone --recurse-submodules https://github.com/emscripten-core/emscripten.gitgit clone --shallow-since=2024-01-01 https://github.com/expressjs/express.gitgit clone --filter=blob:none https://github.com/expressjs/express.gitgit clone --single-branch --branch v5.1.0 https://github.com/expressjs/express.gitgit status --short --branchgit status --porcelaingit status --ignoredgit diff --statgit diff --numstatgit diff --name-onlygit diff --word-diffgit diff --checkgit diff HEAD~1 -- src/app.jsgit diff --no-index a.txt b.txtgit add -N file.txtgit add -e file.txtgit add --dry-run .git add --chmod=+x deploy.shgit commit --author='Alice Smith <alice@example.com>' -m 'Refactor auth flow'git commit --squash HEAD~1git commit --date='2024-01-15 10:30'git commit --no-verify -m 'skip hooks'git commit -vgit commit -F changelog-entry.mdgit commit --amend --author='Carol <carol@example.com>'git log --oneline -10git log --graph --oneline --all --decorategit log -S 'calculate_total' --onelinegit log -G 'password\s*=' --onelinegit log --author='Alice' --onelinegit log --follow -- README.mdgit log --statgit log --merges --onelinegit log --no-merges --onelinegit log --first-parent --onelinegit log --format='%h %an %s'git log --until='2024-03-01' --onelinegit log --diff-filter=M --onelinegit log -L 40,60:src/main.rsgit show HEADgit show HEAD~1:src/app.jsgit show --stat HEADgit cat-file -p HEADgit rev-parse HEADgit rev-parse --abbrev-ref HEADgit rev-parse --short HEADgit rev-list --count HEADgit blame server.py --date shortgit blame -w app.jsgit shortlog -snegit grep 'TODO'git grep -n 'apiKey' -- '*.js'git grep -l 'FIXME'git stash push --keep-indexgit stash push -u -m 'wip: draft layout'git stash show -p stash@{0}git stash applygit branch -vvgit branch --mergedgit branch --no-mergedgit branch --show-currentgit branch --list 'feature/*'git branch --set-upstream-to=origin/main maingit branch --contains v1.0.0git branch --sort=-committerdategit branch -dr origin/feature-xgit switch -git switch --detach v1.0.0git switch --orphan gh-pagesgit restore --source=HEAD~1 src/app.jsgit restore --staged --worktree file.txtgit restore --staged .git checkout -- .git checkout -t origin/feature-notificationsgit checkout -p src/app.jsgit merge --ff-only origin/maingit merge --continuegit merge --no-commit feature-xyzgit rebase --skipgit rebase --autostash maingit reset HEAD file.txtgit rm file.txtgit rm --cached file.txtgit rm -r old-assets/git mv old-name.txt new-name.txtgit clean -fdXgit tag -l 'v1.*'git tag -f v1.0.0 abc1234git push origin v1.0.0git push origin :refs/tags/v1.0.0git config --global user.name 'Alice Smith'git config --global user.email 'alice@example.com'git config --global init.defaultBranch maingit config --global alias.co checkoutgit config --global alias.lg "log --oneline --graph --all"git config --global core.editor code --waitgit config --listgit config --get remote.origin.urlgit config --global credential.helper storegit config --global core.autocrlf inputgit config --global color.ui autogit config --global pull.rebase truegit remote add upstream https://github.com/expressjs/express.gitgit remote rename origin upstreamgit remote show origingit remote prune origingit remote get-url origingit fetch origin feature-branchgit fetch --tagsgit pull --rebase origin maingit pull --ff-onlygit pull --autostashgit push --dry-run origin maingit push origin main --follow-tagsgit push --all origingit submodule statusgit submodule deinit -f libs/libgit archive --format=zip --prefix=myapp/ HEAD -o myapp.zipgit count-objects -vHgit gc --autogit maintenance run --autogit fsck --fullgit check-ignore .envgit ls-tree -r HEAD --name-onlygit describe --abbrev=0git versiongit show-ref --headsgit difftool HEAD~1 HEAD -- src/app.jsgit mergetool
Search all 7,657 commands instead.