Reputation: 14961
this is just an idea. I am thinking about it, not sure if this is optimal or not.
we are a tiny team. 1 person up to 3 persons. Generally just one person. So basically all that is written or almost all, say 99%, will be pushed to staging / production asap. There is no big long term feature development happening on the side.
we have 3 stages
I created on git 2 branches:
you locally develop, once happy with it, you push it to staging.
it works well? we merge it to the production branch.
Like this, it is very easy to see what is live, that is everything that is on the production branch.
Now what is the best way to merge from staging to production? to keep the commits, but as well, to see when the merge was done. So it is easy to revert to "pre merge" state.
generally, is there a better way to do this?
how to correctly tag things?
it must be simple, for a mostly one person team, or tiny team a big long complicated thing doesn't really make sense.
i was reading here:
https://datasift.github.io/gitflow/IntroducingGitFlow.html
it does not provide the commands, and it looks a bit too complicated to me
Upvotes: 0
Views: 83
Reputation: 1276
I think git flow is not so complicated. It makes a lot of work by its self and maybe it is what you are looking for in order to have a linear chronology and good branch handling. It offers some default branches that help you with software configuration management.
Usually I mainly use two git flow possibilities:
git flow feature start featureName
a new branch is created, starting by develop branch. You could use this possibility everytime you want to add a new feature to your application. When you have finished to develop your new feature, with git flow feature finish featureName
, the branch is merged to develop (no fast forward) and then deleted. git flow release publish releaseName
, release branch is merged in develop and master branch (always without fast forward use). Git flow offers other branch types, for hotfix or bugfix for example. I suggest to look to this cheatsheet because I think it could be a good start point.
Upvotes: 1