On improving commit practices

Posted by greengit on Programmers See other posts from Programmers or by greengit
Published on 2012-04-09T12:27:00Z Indexed on 2012/04/09 17:47 UTC
Read the original article Hit count: 833

I was thinking about ways to improving my commit practices.

Is there any co-relation between no. of source code lines and no. of commits?

In a recent project that I was involved in, I was going at 30 commits per 1000 lines.

One typical file from the project has these stats

language: JavaScript
total commits that include this file: 32

total lines: 1408
source lines: 1140
comment lines: 98

no. of function declarations: 28
other declarations: 8

Another file has these...

Language: Python
total commits that include this file: 17

total lines: 933
source lines: 730
comment lines: 80

classes: 1
methods: 10

I also think that no. of commits is more related to no. of features or no. of changes to the code and less to the no. of lines.

The general git community motto is make short commits and commit often.

So, do you really think about you commit strategy before you start the project. For that matter, is there anything like commit strategy? If so, what's yours?

© Programmers or respective owner

Related posts about version-control

Related posts about programming-practices