Git tricks
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
Adding a sub module
git submodule add https://github.com/chaconinc/DbConnector
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