$ git commit -am 'fix bug'
$ git checkout -b feature
$ git log --oneline --graph --all --decorate
| -m | use the next argument as the commit message |
| -a | automatically stage every tracked, modified file |
| -b | create and switch to a new branch |
| -f | force the operation |
| -d | delete (e.g. a branch) |
| -D | force-delete (e.g. an unmerged branch) |
| -n | dry run / no-commit, depending on the subcommand |
| --amend | replace the previous commit instead of adding a new one |
| --force | force the operation (e.g. push) |
| --force-with-lease | force-push only if the remote hasn't moved since you fetched |
| --all | operate on everything (all branches / all changes) |
| --oneline | show each commit on a single line |
| --graph | draw an ASCII graph of the branch structure |
| --decorate | show ref names (branches, tags) next to commits |
| --continue | resume the operation after resolving conflicts |
| --abort | cancel the operation and restore the original state |
| --skip | skip the current commit and continue |
| --interactive | interactive — edit the list of commits before replaying them |
| --set-upstream | record this remote branch as the upstream for tracking |
| --no-verify | skip the pre-commit and commit-msg hooks |
| -C | run as if git was started in the given directory |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.