$ git clone {url}
check current branch
$ git branch
check all branch
$ git branch -a
make new branch from current branch
$ git branch {branch name}
chage current branch
$ git checkout {branch name}
make new branch and change current branch to the new branch
$ git checkout -b {branch name}
delete branch
$ git branch -d {branch name}
delete branch with force
$ git branch -D {branch name}
push deleted branch to remote repository
$ git push origin :{deleted branch name}
$ git fetch origin {branch name}
merge current branch from {branch name}
$ git merge {branch name}
recover from merge
git merge --no-ff {branch name}
pull includes fetch and merge
$ git pull
$ git pull origin {branch name}
check differences in local repository.
$ git status
check file differences in local repository.
$ git diff
$ git diff {file path}
$ git log
$ git log --oneline --graph --decorate
add new or modified file to staging
$ git add {file path}
add deleted file to staging
$ git rm {file path}
cansel staging file
$ git rm --cached {file path}
$ git commit
$ git commit -m "{comment}"
$ git push
$ git push origin {branch name}
check differences between local and remote repository
$ git remote prune origin --dry-run
sync local and remote repository. This command will change only local repository.
$ git remote prune origin
check which files will be removed with clean command.
$ git clean -n
clean untracked files
$ git clean
clean untracked files and directries
$ git clean -d
else
$ git clean -f
$ git clean -f {path}
$ git clean -fdx