Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 792 Bytes

README.md

File metadata and controls

17 lines (15 loc) · 792 Bytes

Git katas: Git reset

We can manipulate the History very much so. We should only ever tinker with our local history. As publicly release commits must expect to be immutable.

We use reset to unstage change, but we can also do many more different things.

Task

  1. Run the command . setup.sh
  2. How does your working directory look like?
  3. What does your log look like?
  4. Try to run git reset --soft HEAD~1
  5. What happens to your working directory, your log and your stage?
  6. Run git reset --mixed HEAD~1
  7. What happens to your working directory, your log and your stage?
  8. Run git reset --hard HEAD~1
  9. What happens to your working directory, your log and your stage?
  10. Now try to use git revert HEAD~1
  11. What happens to your working directory, your log and your stage?