Answers
Here are the answers to the questions given above:
- Use a Git alias, a shell alias, or a shell function.
- You can use the
git config --get-regexp ^
alias\.
command. - Use
git difftool
for displaying differences, orgit mergetool
to help with resolving merge conflicts. There is built-in support for many of the existing graphical tools. - If it is about configuration values, you can use
git config --show-origin
(or--show-scope
). If it is about per-file attributes, usegit check-attr
. If it is about ignoring files, usegit check-ignore
. - Use the
pre-commit
hook (and other similar hooks) to warn if best practices are not being followed. There are many third-party tools that help with hook management and often support various helper tools such as linters and code formatting tools.