我有一个使用 git 来检查历史记录的 Rails 项目。我的网页设计师同事帮助我做html和css,并使用git检查她的项目。因此,有两个 git 存储库需要我检查。有时我想自己改变一些小的css东西。但是我发现这很糟糕,因为我需要在两个存储库中提交相同的东西来git。
我如何与我的网页设计师同事合作?
文件夹目录如下所示:
导轨:
blog/
-app/
-assets/
-images/
-javascripts/
-stylesheets/
-controllers/
-..../
-config/
-...../
目录:
blog/
-assets/
-images/
-javascripts/
-stylesheets/
index.html
about.html
如果我使用将 html 项目添加到 Rails 项目的子模块,我需要更改 Html 项目的目录结构吗?我怎样才能忽略 Rails 项目中的index.html
和about.html
?
只需使用 submodule
:
$ git submodule add path/to/remote/ui/repo path/to/local/ui/folder
当您需要修改部分UI文件时,只需cd到path/to/local/ui/folder
即可。只需将其视为单独的存储库即可。