World map

 

BM: Baca dalam Bahasa Melayu

World 0: Start Here

Getting help

You will learn: three quick ways to get help when you forget a command.

The problem

You forgot how a command works. It happens to everyone, even experts. Where do you look?

Watch

git commit -h prints a short list of options, like -m for the message. Terminal output: $ git commit -h usage: git commit [<options>] [--] <pathspec>... -m, --message <message> commit message -a, --all commit all changed files --amend amend previous commit --no-edit use the selected message without launching an editor

Add -h to a command for a short help. git commit -h lists the options for commit, right here in the terminal.

Watch

git help commit shows the help page for commit, with a link to the full manual. Terminal output: $ git help commit GIT-COMMIT(1) usage: git commit [<options>] [--] <pathspec>... -m, --message <message> commit message -a, --all commit all changed files --amend amend previous commit --no-edit use the selected message without launching an editor Full manual: https://git-scm.com/docs/git-commit

git help commit opens the full manual for commit. It explains every option. On a Mac or Linux, press q to close it.

Predict

You only forgot the option for a commit message. Which help is fastest?

Pick one answer.

Predict

You want to learn everything git log can do. Which help fits best?

Pick one answer.

Try it

Ask Git for help with add. Pick either way.

Check

The FahamLah cheat sheet lists every command from this course. Find it in the top bar. You forgot how to see your history. Where do you look first?

Pick one answer.

You did it!

You can now get help for any Git command in seconds.

Go deeper (optional)

The full manual also lives online at git-scm.com/docs. git help -a lists every Git command. git help git explains Git itself. On Windows, git help opens the manual in your web browser.