Skip to main content

Git Commands

Git Command
Description
git init
Init new git project in current folder (folder needs to be empty)
git clone git@github.com:myusername/myrepositoryname.git
Clone a git repository from github.com
git status
Show status of unstaged files, project info, ...
git branch -a
Show all git branches
git checkout myotherbranch
Switch to another git branch
git log
Show latest git commits and messages
git stash --include-untracked
Save all changes to the stash
git stash push -m stashname

git stash list
Show all saved stashes