achter.be

photography, coffee, technology and more

Terminal: Git commands cheat sheet

To start a repository from the command line:

git init
git add .
git commit -m "initial import"

When files are added to .gitignore and are not removed, use following commands and commit.

git rm -r --cached .
git add .
git commit -m "fixed untracked files"