GIT cheatsheet

init repository

git init <repository-name> --bare

submodules

git checkout <commit-id>
git submodule deinit --all -f
git submodule update --init --recursive

Problem fixing

$ git status
fatal: index file smaller than expected
$ rm .git/index
$ git reset HEAD .
$ git status

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.