Git tricks: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 13: | Line 13: | ||
=== updating submodules === | === updating submodules === | ||
$git submodule update --remote | $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 | |||
Revision as of 10:40, 9 January 2023
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