I’ve been using Git for couple of years more or less frequently. Mostly I’ve been using git when developing Cppcheck. In past months I’ve also used git at work. Some time ago I’ve finally looked at really using git for my OSS development work with Cppcheck.
So far my git use with Cppcheck (and other projects) has been very simple. Just pulling latest changes to master branch, committing and pushing commits to same master branch. Cppcheck development does not use feature branches, just the master branch. And my contributions have been pretty small and straightforward touching code that others haven’t been touching (much). As I’ve mostly worked with Windows support and GUI.
Then I decided that I finally want to improve cppcheck Windows integration. It is barely working but a bit messy and there is a lot to improve. Similarly I wanted to look at really improving GUI.
For that I didn’t want to work in master branch. I didn’t even want to work on Dan’s tree because I would be experimenting a lot. Yet I want to share my code for others to comment and discuss. I was curious if git can do all this for me?
Luckily there is GitHub! I can make my own clone of repository with single button click. Then I can work on my own clone as if I was working on Dan’s tree. I can even add branches from Dan’s tree as branches to my own repository. So I can easily follow also the upstream development and merge upstream code to my changes. This opens lots of new interesting possibilities for sharing work and code.
Experimenting with some of the possibilities took couple of days and quite a many deletions of repositories and cloning them again. But it was definitely worth of it! I’m actually starting like the possibilities and flexibility of git! And I feel I’m only scratching the surface here…
I think git is power user tool. It requires quite a bit learning. It is quite frightening for people like me coming from simpler (and more restricted) tools. You can start using git pretty fast for simple things. And I guess most users are happy with these simple usage patterns. But if you really want to take advantage of all the possibilities of git you need to reserve time for learning and experimenting.
And if the simple use is all that is needed then the git might be the wrong tool. For example Mercurial and Bazaar are simpler and easier to use in many cases. And easier to learn.