Chapter 4. Edit & Commit
Once you launch a project, you can start to write and edit your code. You can save several versions of code in your Local Repository by committing the codes. In this chapter, we’ll explain key Git commands used in the cycle of editing and saving code (creating version histories).
The following lessons are covered in this chapter.
Lessons in this chapter
- Git Regular Workflow – Edit & Commit
- Edit and Commit Overview (1)
- Add Files to Staging Area – git add
- Commit Files – git commit
- HEAD and INDEX
- Check Status of Working Tree and Staging Area – git status
- Check Commit Histories – git log
- Check Differences – git diff
- Restore Files to Working Tree – git restore
- Undo Changes – git reset
- Delete Files – git rm
- Edit and Commit Overview (2)