- Unstaging (undo the file after adding it):
git reset FILENAME
- untrack a file:
git rm --cached file_name
- Removing files from git repo (remote), after they have been removed from disk (local):
git rm $(git ls-files --deleted)
- Show all branches:
git branch -a
- Show remote branches:
git branch -r
- Show past versions of a file:
git show REVISION:path/to/file
For example 4 commits before the HEAD for the main.c file.
git show HEAD~4:src/main.c
- Change the origin:
git remote set-url origin git://new.url.here
- List the configuration:
git config --list
or in geberal
git config