添加 git 存储库外部的文件夹(工作流程)
我正在尝试找出 git 工作流程。目前,我们有一个包含旧版实时站点的 httpdocs 目录,我们不希望它成为 git 存储库的一部分。我一直在构建一个独立于主站点运行的更新的移动平台。源代码位于parent/src 和parent/httpdocs/md 中。我的权限不允许我在父文件夹中创建 git 存储库。
我尝试在父级中创建另一个文件夹,例如parent/repo,在其中创建一个git存储库,然后将正确的子文件夹添加到该存储库(parent/src和parent/httpdocs/md),但git不允许您可以添加不属于 git 存储库子级的子文件夹。
有没有办法解决这个问题,或者有任何人都能想到的适合我的 git 工作流程的解决方案。我是 git 的新手,不太确定其可能性。
谢谢
I am trying to figure out a git workflow. At the moment we have a httpdocs directory with the old legacy live site, which we don't want to be part of a git repo. I have been building a newer mobile platform that runs sperate to the main site. The source code is within parent/src and parent/httpdocs/md. My permissions don't allow me to create a git repository in the parent folder.
I have tried to create another folder in the parent for example parent/repo, create a git repo in that and then add the correct sub folder to that repo (parent/src and parent/httpdocs/md), but git doesn't allow you to add subfolders that are not a child of the git repo.
Is there a way around this or a solution for my git workflow that anyone can think of. I am new to git and not too sure of the possibilities.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如何将
parent/httpdocs/md
内容移动到parent/src
中,然后创建一个指向新的parent/httpdocs/md
符号链接地点。然后您可以在parent/src
中创建存储库。无论如何,最好将网站上的文件与您进行更改的存储库的工作目录分开。
How about moving the
parent/httpdocs/md
stuff intoparent/src
and then creating aparent/httpdocs/md
symlink which points to the new location. Then you could create your repository inparent/src
.In any case, it would be a good idea to separate the files which are live on the website from the working dir of the repository, where you make changes.