When you modify a file in your repository, the change is initially unstaged. In order to commit it, you must stage it—that is, add it to the index—using git add
. When you make a commit, the changes that are committed are those that have been added to the index.
git reset
changes, at minimum, where your current branch is pointing. The difference between --mixed
and --soft
is whether or not your index is also modified. So, if we're on branch master
with this series of commits:
- A - B - C (master)
HEAD
points to C
and the index matches C
.
From my Pluralsight course: https://app.pluralsight.com/library/courses/asynchronous-javascript-reasoning/table-of-contents
- Weather http://plnkr.co/edit/ZOAaSdtnfvR6WwiuVZ6s
- Avoid Blocking – Red Background http://plnkr.co/edit/z29VyH5BPvC4oc40EyOu
- setTimeout Pyramid Challenge http://plnkr.co/edit/DGiHFQOQfnipCcpex2RH
- Drag and Drop Red Box http://plnkr.co/edit/SmSpPS5ZgPvkgn8RE6y1
- Timer onReady http://plnkr.co/edit/gafgKCrxnDIJ6YaG9Jpx
- Timer measure http://plnkr.co/edit/kPOgzEuIvUmN4o6Jenem
- Progress Number Crunching - Web Worker https://plnkr.co/edit/Yy7BOZU9sIa8EyrxJwGH
- Event Listeners Are Synchronous http://plnkr.co/edit/mDvSHpF3HcTjtvltGmQn