Skip to main content

Git



Commands

Search:
Designation 🔼
command
Description
branch changeTogit checkout [name]
branch checkoutgit checkout [branchName]
branch checkout, create if not existinggit checkout -b [branchName]
branch checkout, create new based on maingit checkout -b [branchName] main
branch creategit branch [name]
branch deletegit branch -d [branchName]
branch merge in maingit checkout main git merge [otherBranch]
branch showgit branch
commit git commit -m "commitMessage”
commit Editor close:wq ⏎
commit revertgit revert [Hashtag]
directory change cd ..note: whitespace
directory change to last cd -
directory changeTocd /c/p/dev/java/git test
directory createNewmkdir [name]
email checkgit config –global user.email
email setgit config –global user.email “p@m.de”
file createtouch [fileName]
file listLs
file moveTomv [filenName] [direcoryName]
file renamemv [name] [newName]
file stage allgit add .
file stage single file git add [fileName]
file unstagegit rm --cached [fileName]
fork Origincloned remote repository
fork push origingit push origin [branchName]
fork Upstreamgit pull upstream mainofficial remote repository
graph showgit log --graph
list commit short Hashtaggit log --oneline
print working directorypwd
remote check differencesgit fetch
remote pullgit pull --all
remote pushgit push origin [branchName]
remote push in branchgit push -u origin [branchName]
remote push locally created branchgit push --set-upstream origin [branchName]
remote repository listgit remote -v
repository check differencesgit status
repository clonegit clone [repositoryUrl]
repository creategit init
repository show historygit log
shell clearcls
tags push to origingit push --tags origin
tags setgit tag 1.0.0
username checkgit config –global user.name
username setgit config –global user.name [x]
version checkgit -v
VsCode open current directorycode .