I’ve upgraded my blog theme recently. In my best practice in development process, I prefer using gitflow to manage the code. It is one of popular version control workflow on the planet. And the FLOW looks like this:
In almost one year, I am always git push
my posts on main
branch.
But before I start upgraded my theme, I git checkout
to develop
branch.
According to the chart above, when we want to add some new feature, we create a FEATURE branch from develop
branch.
After finishing it, we merge the feature branch into develop
branch.
But how to bring my new feature deploying to my blog? (in here means main
branch)
We have to create a RELEASE branch, then close it, merging it into bothdevelop
branch AND main
branch.
Release branch seems meaningless here, because it is used as testing the feature from QAs.
Since this is my personal project, so release branch does not do anything.
I just follow the gitflow.
In main
branch, there is only one way to update new code: from release branch.
But in my blog here, it might be pain.
I am wandering, what if I created every post at develop
branch, then must do tedious create-branch-merge-branch process every time I want to publish my new post.
From the beginning, I insisted on doing the right gitflow process. But now I must compromise. “That’s not practical.” I told to myself. So the conclusion is, I have decided do this into two parts.
First, creating posts will remain on main
branch directly, for the sake of convenience.
Second, other things will doing it on develop
or feature branch.
Something like updating blog config, making some change with folder structure, trying modified the theme, …etc.
I think it is good to go.
Cheers.