git show [commit]
: Show various types of objects.
git show a1b2c3d4
git ls-files
: Show information about files in the index and the working directory.
git ls-files
git clean -f
: Remove untracked files from the working directory.
git clean -f
git gc
: Optimize the repository.
git gc
git config --global alias.[alias-name] [git-command]
: Create a shortcut for a Git command.
git config --global alias.co checkout
git co main
These examples should give you a practical understanding of how to use various Git commands in real-life scenarios.