Git Command Options
git-dir
git-dir
DON'T FORGET THE .git
AT THE END OF THE DIR PATH!!
git --git-dir=path/to/git/dir/.git <git-command (e.g. log, commit, push, etc.)>
branch
branch
If the branch is remote (you did not fetch), then you have to append the branch name to origin/
git <git-command (e.g. log, commit, push, etc.)> origin/<BRANCH_NAME>
date
date
Date options:
iso-strict-local
relative
local
iso
short
human
git <git-command> --date=<date_option>
pretty
pretty
Format options:
%ad
(show date)%ae
(show author)
git <git-command> --pretty=format:'<format_option>'
Last updated
Was this helpful?