开发者

Is it possible to view a branch of a website's clone using git?

开发者 https://www.devze.com 2023-04-11 10:41 出处:网络
I have a working version of a website that is a clone of the DocumentRoot located in my /home/dmaxwell/public_html folder.I would like to branch off of my working clone and try some different things,

I have a working version of a website that is a clone of the DocumentRoot located in my /home/dmaxwell/public_html folder. I would like to branch off of my working clone and try some different things, however, when I go to check to see any progress the master branch is the version that the browser shows. Is there a way to get the browser to show the experimental branch or am I limited to only 开发者_运维知识库using the master branch?


Your website will show whatever is present in the code checked out. If you want to view the branch, check it out:

 git checkout branch_name


you can switch back and fourth between branches using

git checkout <branch>


You can "clone" your branch to a different location under the same web-server or under different web-server and see it there. This is not really git related more like what your deployment/infrastructure is.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号