当前位置 博文首页 > 如何创建网站的暂存版本_cuk0051的博客:暂存区和版本库

    如何创建网站的暂存版本_cuk0051的博客:暂存区和版本库

    作者:[db:作者] 时间:2021-09-09 16:43

    暂存区和版本库

    I was in the process of launching a course, and I needed to finalize the landing page that would be up on the “launch day”, without however changing the current version of the site I had up for the public.

    我当时正在启动一门课程,我需要完成在“发布日”上将要到达的登录页面,而不更改我为公众准备的网站的当前版本。

    I am using Netlify which makes it easy to automatically deploy the website from a Git branch, in my case hosted on GitHub. I will document this process. Other hosting providers that base their CI/CD on a Git repository might have a similar tool in place.

    我正在使用Netlify ,它使从Git分支自动部署网站变得容易,在我的案例中,该站点托管在GitHub上 。 我将记录此过程。 其他将其CI / CD基于Git存储库的托管服务提供商可能已经使用了类似的工具。

    Netlify automatically builds deploy previews for Pull Requests.

    Netlify自动为Pull Requests构建部署预览。

    So what I did is, I created a new branch, which I called launch, and started working on it by adding a few commits, then I created a Pull Request, something that GitHub Desktop makes very easy:

    所以我要做的是,创建了一个新分支,称为launch ,并通过添加一些提交开始对其进行操作,然后创建了一个Pull Request,这使得GitHub Desktop变得非常容易:

    cs