[英]Adding GIT to copy of the source code
On legacy project with 2 environments prod and dev . 在具有两个环境prod和dev的遗留项目上。
We recently added git on prod and pushed all the changes in the master branch, and can now support this server better. 我们最近在prod上添加了git并将所有更改推送到master分支中,现在可以更好地支持此服务器。
However I have trouble initiating the git tracking on our dev server, there code base there is a bit different and I can not just clone it fresh... 但是我在我们的开发服务器上启动git跟踪时遇到了麻烦,那里的代码库有些不同,我不能只是将其克隆...
What are the proper steps to add git repository tracking, to existing code, similar to the master branch ? 类似于master分支,将git仓库跟踪添加到现有代码中的适当步骤是什么?
I tried: 我试过了:
git init
git origin add remote ...
git branch --set-upstream master origin/master
But now all my local files are shown as locally deleted. 但是现在我所有的本地文件都显示为本地删除。
git checkout master
shows conflict on all files git checkout master
在所有文件上显示冲突
git pull
says all is up to date git pull
说一切都是最新的
develop
develop
develop
branch develop
分支 develop
branch into master
. develop
分支合并为master
。 This will be a new prod
codebase. prod
代码库。 Disclamer. 免责声明。 This is not an endorsement of a proper release process, just the answer to OP problem
这不是对正确发布过程的认可,而只是对OP问题的答案
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.