The way to build and deploy by specifying git commit id

Hi, I am currenly using Netlify with connecting Github.

Now what I want to do is that build and deploy previous version by specifying git commit id.
In this case, I prefer not to use ‘git push’ because of I will change version many times and not want to record commit log
(Maybe I need revert or ‘push -f’)

Do you have any idea to deploy by specifying commit-id?
It is ok for using Netlify Cli or API.
but I’d like to ask Netlify to build.

Thanks a lot.

Hi @rsooo. I think you can try another approach by using git branching model. Let say you have master branch for production ready codes. In case you want to develop some features, create another branch and work on it until it get merged into master.

Hi @nnluukhtn , thank you for replying.

I 'd like to explain current situation little bit more.
I think I want to change build and deploy system from current system to Netlify.

In current system, we use Git tag(=commit id) base deploy flow.
By specifying git commit id, the contents related this commit id were built and deployed.

I hope I want to do similar way with Netlify.
In default setting, we can deploy by merging master, but when deploy previous
version frequently, I need to revert or “push -f”. In this case we can not manage commit history.
So I was looking for better way.

In other way, I think to separate ‘master-release’ branch for deploy purpose.
Any other good ideas would be appreciated.

Thanks.

I have finally resolved by reconsidering build flow.
I have prepared xxx-release branch, and when we deploy it,
once I delete branch in github and push release branch.
I have accomplished what we wanted to do.

Thank you for your cooperation

1 Like