我有一个项目,为此我设置了一个git存储库。我有两个分支机构:master分支和development分支。这都是在我的服务器上设置的。我想做的是从子域访问和测试我的开发分支,当一切正常时,合并到主站点,后者运行主站点。例如:
主分支:example.com
开发分支:dev.example.com
这可能吗?我的站点是一个运行在Node上的Express应用,我正在Ubuntu 20.04服务器上使用Nginx,而主域和子域位于不同的服务器块上。任何帮助或正确方向的指点将不胜感激。
是的,这很有可能。请参阅下面的cmds。
$ cd /tmp
$ mkdir abc
$ cd abc
$ git init
Initialized empty Git repository in /tmp/abc/.git/
$ echo testing > README
$ git add README
$ git commit -m 'first commit'
[master (root-commit) e675a97] first commit
1 file changed, 1 insertion(+)
create mode 100644 README
$ cd ..
$ git clone abc def
Cloning into 'def'...
done.
$ cd def
$ ls
README
$
参考:https : //www.reddit.com/r/git/comments/5giehg/is_it_possible_to_have_a_remote_thats_on_the_same/
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句