While a regular git clean will ignore them as well, passing the -x switch changes that:
- Dry run:
git clean -xn - Clean files:
git clean -x - Clean by passing the -f (force) or -d (directories):
git clean -xdf
- Commits on dev branch but not on master:
git log master..dev - New commits on dev branch that affect a specific file:
git log master..dev -- file/path/lib.py - Changes on dev branch but not on master:
git diff master..dev - Changes on dev branch that affect a specific file:
git diff master..dev -- file/path/lib.py
- Latest revision on the currently active branch:
git rev-parse HEAD
- list changed files in HEAD:
git diff-tree --no-commit-id --name-only -r HEAD