How should I structure my git commits?

Posted by int3 on Stack Overflow See other posts from Stack Overflow or by int3
Published on 2010-04-02T07:38:29Z Indexed on 2010/04/02 7:43 UTC
Read the original article Hit count: 285

Filed under:
|

I'm trying to contribute to open source software for the first time, but I'm pretty inexperienced with version control systems. In particular, right now I want to make a number of changes to different parts of the code, but I'm not sure if the maintainer would want to integrate all of them into the master repository. However, the changes I'll be making are independent, i.e. they affect different parts of the file, or parts of different files.

How should I go about making the changes? If I make a string of commits on the same branch, will the maintainer be able to pick and choose what he wants from the individual commit? E.g. can he patch in the changes I made in my second commit while ignoring the first one? Or should I make each change in a separate branch?

© Stack Overflow or respective owner

Related posts about git

Related posts about version-control