git

Useful commands


git status

Gives general info


git reset --hard

Sets everything back the hard way.


git log --oneline --graph --decorate --all

Lists the repo tree


git lfs prune

Deletes local copies of LFS files which are old.

Doc


git pull --recurse-submodules=yes

Pulls repo plus submodules

After cloning a repository with submodules, you need to run:

git submodule update --init --recursive

This command:

  • --init initializes all submodules listed in .gitmodules.
  • update checks out the commit that the parent repository expects.
  • --recursive also initializes nested submodules.