Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Check status Link to heading

git status

Count the number of lines Link to heading

git ls-files | xargs wc -l 

Squash commits Link to heading

git rebase -i HEAD~N

e.g. git rebase -i HEAD~3

Remove all local untracked files Link to heading

git clean -fdx

Check submodule status Link to heading

git submodule status

Update submodule Link to heading

git submodule update --remote <submodule-path>

Stage submodule changes Link to heading

git add <submodule-path>

Reference Link to heading