Git tricks

From Mike's wiki
Revision as of 10:40, 9 January 2023 by Mike (talk | contribs)
Jump to navigation Jump to search

getting differenc

From last pull

$ git diff HEAD $ git diff @~

between now and previuos release

$ git diff --name-status HEAD~1..HEAD

Resetting - remove all changes.

$ git reset --hard

updating submodules

$git submodule update --remote

Clean repository

git clean -xfd

Clean submodules

git submodule foreach --recursive git clean -xfd

Remove all changes

git reset --hard

Remove all changes from submodules

git submodule foreach --recursive git reset --hard

setup submodules

git submodule update --init --recursive