Loading tutorials
git log with no options and learn to read what it prints.2 min readgit log prints several lines per commit. That is too much to scan in a large repository. This chapter covers the options that make the output compact and show how commits relate to each other.2 min readgit log and read its default output, and that you know commits, branches, and the working tree. Here you will cut a long history down to the commits you care about.2 min readgit diff, git show, and git log -p print. Later chapters cover what git diff compares.2 min readgit add, commit, and create branches. It also assumes you can read a unified diff, which the previous chapter covered. Here the question is which two things git diff compares.2 min readgit log and read a unified diff, as covered in earlier chapters. By default, git log lists commit metadata only. To see what each commit changed, you add a flag to log or use git show.2 min readgit log with --oneline, know that each commit points to its parent, and have two branches that have diverged. A revision range tells git log which commits to list. The two range forms, A..B and A...B, answer different questions.3 min readgit diff compares (working tree, index, HEAD, commits).2 min readgit log by date, author, and path. Those filters answer "who" and "when". This chapter covers the question "which commit touched this code?" It assumes you can read a unified diff and use git log -p.3 min readgit diff compares. You will learn how A..B and A...B behave in git log and in git diff. They behave differently in each, and mixing them up is a common source of conf3 min readgit diff with the usual targets (working tree, index, HEAD). It covers two ways to make a noisy diff easier to read: ignoring whitespace changes and comparing at word level instead of line level.2 min readgit log with --oneline and --graph, and that you know how a merge commit has two parents. It covers three options that control how merges appear in the log: --first-parent, --no-merges, and --merges.2 min readgit log with a path filter and read --name-status output. It also assumes you know that a commit points to its parent.2 min readgit log output and a unified diff, and that you know the range syntax A..B. It combines those skills on one question: when did a behavior enter the codebase, and why?2 min read