ToolNext

Gitコマンドチートシート

よく使うGitコマンドのクイックリファレンス

tools.git-cheatsheet.sectionInit
git inittools.git-cheatsheet.descInitInit
git init <directory>tools.git-cheatsheet.descInitInitDir
git config --global user.name "Name"tools.git-cheatsheet.descInitUserName
git config --global user.email "email"tools.git-cheatsheet.descInitUserEmail
git config --listtools.git-cheatsheet.descInitConfigList
git clone <url>tools.git-cheatsheet.descInitClone
git clone <url> <directory>tools.git-cheatsheet.descInitCloneDir
tools.git-cheatsheet.sectionBasic
git statustools.git-cheatsheet.descBasicStatus
git add <file>tools.git-cheatsheet.descBasicAddFile
git add .tools.git-cheatsheet.descBasicAddAll
git add -ptools.git-cheatsheet.descBasicAddPatch
git commit -m "message"tools.git-cheatsheet.descBasicCommit
git commit --amendtools.git-cheatsheet.descBasicAmend
git commit --amend --no-edittools.git-cheatsheet.descBasicAmendNoEdit
git rm <file>tools.git-cheatsheet.descBasicRm
git mv <old> <new>tools.git-cheatsheet.descBasicMv
tools.git-cheatsheet.sectionBranch
git branchtools.git-cheatsheet.descBranchList
git branch <name>tools.git-cheatsheet.descBranchCreate
git branch -d <name>tools.git-cheatsheet.descBranchDelete
git branch -D <name>tools.git-cheatsheet.descBranchForceDelete
git branch -rtools.git-cheatsheet.descBranchRemote
git checkout -b <name>tools.git-cheatsheet.descBranchCheckoutB
git switch <name>tools.git-cheatsheet.descBranchSwitch
git switch -c <name>tools.git-cheatsheet.descBranchSwitchC
git merge <branch>tools.git-cheatsheet.descBranchMerge
git merge --no-ff <branch>tools.git-cheatsheet.descBranchMergeNoFF
git rebase <branch>tools.git-cheatsheet.descBranchRebase
git rebase -i HEAD~ntools.git-cheatsheet.descBranchRebaseI
tools.git-cheatsheet.sectionRemote
git remote add origin <url>tools.git-cheatsheet.descRemoteAdd
git remote -vtools.git-cheatsheet.descRemoteV
git remote remove <name>tools.git-cheatsheet.descRemoteRemove
git pushtools.git-cheatsheet.descRemotePush
git push -u origin <branch>tools.git-cheatsheet.descRemotePushU
git push --force-with-leasetools.git-cheatsheet.descRemotePushForce
git pulltools.git-cheatsheet.descRemotePull
git pull --rebasetools.git-cheatsheet.descRemotePullRebase
git fetchtools.git-cheatsheet.descRemoteFetch
git fetch --alltools.git-cheatsheet.descRemoteFetchAll
tools.git-cheatsheet.sectionHistory
git logtools.git-cheatsheet.descHistoryLog
git log --onelinetools.git-cheatsheet.descHistoryLogOneline
git log --graph --onelinetools.git-cheatsheet.descHistoryLogGraph
git log -ptools.git-cheatsheet.descHistoryLogP
git log --author="name"tools.git-cheatsheet.descHistoryLogAuthor
git difftools.git-cheatsheet.descHistoryDiff
git diff --stagedtools.git-cheatsheet.descHistoryDiffStaged
git diff <branch1>..<branch2>tools.git-cheatsheet.descHistoryDiffBranch
git show <commit>tools.git-cheatsheet.descHistoryShow
git blame <file>tools.git-cheatsheet.descHistoryBlame
tools.git-cheatsheet.sectionUndo
git reset HEAD <file>tools.git-cheatsheet.descUndoReset
git reset --soft HEAD~1tools.git-cheatsheet.descUndoResetSoft
git reset --hard HEAD~1tools.git-cheatsheet.descUndoResetHard
git revert <commit>tools.git-cheatsheet.descUndoRevert
git checkout -- <file>tools.git-cheatsheet.descUndoCheckout
git restore <file>tools.git-cheatsheet.descUndoRestore
git stashtools.git-cheatsheet.descUndoStash
git stash poptools.git-cheatsheet.descUndoStashPop
git stash listtools.git-cheatsheet.descUndoStashList
git stash droptools.git-cheatsheet.descUndoStashDrop
git clean -fdtools.git-cheatsheet.descUndoClean
tools.git-cheatsheet.sectionTag
git tagtools.git-cheatsheet.descTagList
git tag <name>tools.git-cheatsheet.descTagCreate
git tag -a <name> -m "msg"tools.git-cheatsheet.descTagAnnotate
git tag -d <name>tools.git-cheatsheet.descTagDelete
git push --tagstools.git-cheatsheet.descTagPush
git push origin :refs/tags/<name>tools.git-cheatsheet.descTagDeleteRemote
tools.git-cheatsheet.sectionAdvanced
git cherry-pick <commit>tools.git-cheatsheet.descAdvCherryPick
git bisect starttools.git-cheatsheet.descAdvBisectStart
git bisect good/badtools.git-cheatsheet.descAdvBisectGoodBad
git archive --format=zip HEAD > out.ziptools.git-cheatsheet.descAdvArchive
git submodule add <url>tools.git-cheatsheet.descAdvSubmoduleAdd
git submodule update --inittools.git-cheatsheet.descAdvSubmoduleUpdate
git worktree add <path> <branch>tools.git-cheatsheet.descAdvWorktree
git reflogtools.git-cheatsheet.descAdvReflog

工具说明

init・commit・branch・merge・remote・undoなどのGitコマンドを網羅した検索・フィルター対応のチートシート。Git初心者の学習や日常的な参照に最適。

gitcommand命令速查cheatsheet版本控制