Source control is a developer’s best friend. The ability to share code with multiple developers, track changes, and easily roll back when problems arise is indispensable in this distributed world.
It may make your commit history more verbose, but in the end it will make your overall project a lot more flexible for bug fixes, feature migrations, and rollbacks.
Atomic Approach
Commit each fix or task as a separate change
Only commit when a block of work is complete
Commit each layout change separately
Joint commit for layout file, code behind file, and additional resources
Atomic Git Commits
Atomic Approach
Benefits
Source
https://www.freshconsulting.com/atomic-commits/