> For the complete documentation index, see [llms.txt](https://lauradang.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lauradang.gitbook.io/notes/version-control/git/git-command-options.md).

# Git Command Options

## `git-dir`

**DON'T FORGET THE `.git` AT THE END OF THE DIR PATH!!**

```bash
git --git-dir=path/to/git/dir/.git <git-command (e.g. log, commit, push, etc.)>
```

## `branch`

If the branch is remote (you did not fetch), then you have to append the branch name to `origin/`

```bash
git <git-command (e.g. log, commit, push, etc.)> origin/<BRANCH_NAME>
```

## `date`

Date options:

* iso-strict-local
* relative
* local
* iso
* short
* human

```bash
git <git-command> --date=<date_option>
```

## `pretty`

Format options:

* `%ad` (show date)
* `%ae` (show author)

```bash
git <git-command> --pretty=format:'<format_option>'
```
