Loading tutorials
Intermediate · Mid: 13 chapters · 37 min read. States assumed prerequisites
Start readinggit init, git add, git commit, git status, and git log in a terminal. You should also know that a branch is a named line of development. You do not need to know anything about git reset yet. This chapter builds the vocabulary that the later chapters use.git init, git add, git commit, git status, and git log, and that you know what a branch is. Every git reset mode is defined by which of the three areas it changes, so you need this model first.git add, git commit, git status, and git log. It also assumes you know that a branch is a movable name for a commit. You should know what HEAD, the index, and the working directory are from the previous chapter.git init, git add, git commit, git status, and git log, and that you know a branch is a movable pointer to a commit. Every git reset form needs a target commit. Picking the wrong one is the most common source of surprises, so it is worth learning the waysgit init, git add, git commit, git status, and git log. It also assumes you know that a branch is a movable pointer to a commit, and that you know the three areas Git tracks: the HEAD commit, the index (staging area), and the working directory.git reset. It assumes you can use init, add, commit, status, and log, and that you know the three areas from earlier chapters: the HEAD commit, the index (staging area), and the working directory. It also assumes you have seen --soft, which moves--soft and --mixed chapters. You should be comfortable with git status and git log --oneline.git add, git commit, git status, and the idea of the index (the staging area) from earlier chapters. You should also know that git reset <commit> moves the current branch. Here you will see a second form of the command, which takes a file path and does not move git init, add, commit, status, and log, that you are comfortable with branches, and that you know what --soft, --mixed, and --hard change in HEAD, the index, and the working directory. Each recipe ngit log, git status, and the three git reset modes. A reset moves a branch, but it does not delete the commits it leaves behind. Those commits stay in the object database for a while, and Git keeps two ways to find them: the reflog and ORIG_HEAD.git init, add, commit, status, and log. It also assumes you know branches and the difference between --soft, --mixed, and --hard. Reset is safe when you know which data it can lose and which history other people depend on. This chapter covers both.git add, git commit, git log, and git status. It also assumes you know what the index and the working directory are, and how git reset moves a branch. Reset is one of three commands that "undo" something. Each one undoes a different thing, and picking the wron--soft, --mixed, and --hard, and the three areas they touch: the HEAD commit, the index, and the working directory. Two more modes, --keep and --merge, work like --hard but refuse to destroy uncommitted work. You will rarely type them, but you should know wh