⇦ Back to: Branch | ⇧ Overview | ⇨ Next: Push

Solve the issue, commit-by-commit

<aside> 📚 A commit is a snapshot of all the files in the repository.

Commits are listed in the log

</aside>

Approach

<aside> 💡 Commit pro-tips:

Using GitHub Desktop

GitHub Desktop automatically recognizes that you’ve made a changes to the files.

https://user-images.githubusercontent.com/2803227/194164478-218c4046-2769-45dd-8d06-102f5d2b4ac0.png

Add your commit summary and optional description in the field at the bottom left, and then press “commit to 12-your-branch-name-here”.

The commit will appear in the log, shown on the “history” tab.

https://user-images.githubusercontent.com/2803227/194583399-b29de289-282f-468e-a877-1e8acc75539b.png

Using git on the command line

Git needs to be told which of your files have been modified. “Stage” these files using the command git add <filename>, e.g.

git add git-text-content.md

To see a list of modified files and whether they are staged (i.e. going to be included in the next commit), run:

git status

https://user-images.githubusercontent.com/2803227/194168104-b12b4b6a-a14c-4ae0-8a47-530f97d9cf7e.png