ajhsu / blog

The external storage of my brain.
3 stars 0 forks source link

Atomic Git Commits #65

Open ajhsu opened 6 years ago

ajhsu commented 6 years ago

Atomic Git Commits

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

  1. Commit each fix or task as a separate change
  2. Only commit when a block of work is complete
  3. Commit each layout change separately
  4. Joint commit for layout file, code behind file, and additional resources

Benefits

  1. Easy to roll back without affecting other changes
  2. Easy to make other changes on the fly
  3. Easy to merge features to other branches

Source

https://www.freshconsulting.com/atomic-commits/

ajhsu commented 5 years ago

Another great article about the atomic commits: https://hearrain.com/git-zui-jia-shi-jian-:-yuan-zi-xing-ti-jiao-atomic-commits