Summary
In this chapter we have learned how to better manage the contents of the working directory, and the contents of the staging area, preparing to create a new commit.
We know how to undo the last commit, how to drop changes to the working area, how to retroactively change the branch we are working on, and other uses of the git reset
command. We now understand the three (and a half) forms of the reset.
We have learned how to examine and search the contents of the working directory, the staging area, and committed changes. We know how to use Git to copy the file version from the worktree, the index, or the HEAD into the worktree or the index. We can use Git to clean (remove) untracked files.
This chapter showed how to configure the handling of files in the working directory; how to make Git ignore files (by making them intentionally untracked) and why. It described how to handle the differences between line ending formats between operating systems. It explained how to enable (and write)...