| git add | git commit |
|---|
| Moves changes to the staging area | Saves the staged changes as a snapshot in the repository |
| Can be used many times before a commit | Creates a permanent point in the history |
| Has no message | Needs a message (-m) |
Changes can be unstaged with git restore --staged | Can be undone with git reset or git revert |
Normal order: edit files, git add, then git commit. See Git Add and Git Commit.
Learn more about the similar topics:
| Tutorials |
| No Content Found. |
| Exercises & Assignments |
| No Content Found. |
| Interview Questions & Answers |
| No Content Found. |