# git commits ## Notes To record a change in your repository, you need to make a commit. you should keep your commit atomics, which mean that each commit will focus on a single topic/feature/change (not necessarily a single file, but in the same theme). (Related:: [[Atomism]]). its better to write commit messages in present tense, like commands to the computer, for example: "rename files with current dates", instead of "I renamed the files" To commit, you first have to decide what to commit. Not every change you currently have in your repo should be part of the same commit. Things you decide to change are switched from *unstaged* to *staged*, i.e **only staged changed will be included in the commit**. Note that the commit is only for the current (Jump:: [[Git Branches|branch]]) Commit commands: 1. *git add* - group together several recent changes into a single commit, so for example: git add file_1.txt file_2.txt 2. (*git add .*) - adds all files 3. *git commit -m "my message"* 4. *git commit --amend* (fix last commit) 5. *git commit -a* - add and commit all changes in the same command If you ## Overview 🔼Topic:: [[Git (MOC)]] ◀Origin:: [[Git and GitHub (course)]] 🔗Link:: [Documentation](https://git-scm.com/docs/git-commit)