Hello guys,

I've experienced some projects to develop application which use git.
Each of projects has more or less different way how to operate git.
However I'm confusing how often commit to branch and what is best unit of 
commit?

Some project team don't care how to use git not only for commit but 
everything.

They commit something as new one every time.

But git history become complex and it's not understandable when checked git 
log.
I think trivial commits message is not necessary.

In one of open-source projects as my past experience, there was rule that 
basically one feature is one commit.
If something modification is required after source code review by team 
reader, I don't do added commit. I redo as same commit to use reset.
```
git reset --soft HEAD~
git commit -am "same message"
git push xxxx xxxxxx
```

I know, it's troublesome, that's why I'm using alias as below.
```
$ git config --global alias.recm '!f(){ cmt=$(git log -n 1 
--pretty=format:%s);git reset --soft HEAD~;git commit -am "${cmt}";};f'
$ git recm
```

Sorry, I digressed.

My question is what is best practice of commit.


Thanks in advance.


-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to