因此,我在本地计算机上基于 Angular-Seed 项目制作了一个小型 Web 应用程序。我从Github克隆了它并制作了项目,没问题。
从 Angular-seed 根目录中删除 .git
目录和 .gitignore
文件后,我添加了所有文件/目录,没有出现任何问题。运行 git status
控制台显示:
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
但是,当我添加、提交并推送到远程存储库时,角度种子目录(以及项目文件的其余部分)不会显示。
目录映射类似于 /home/user/my-local-repo/angular-seed/
,其中所有项目文件都位于 angular-seed
目录中。有人可以帮我吗?
最佳答案
git clone --深度=1 {角度种子存储库链接} mynewproject
cd mynewproject
rm -rf .git
git 初始化
git 远程添加源 {repo 链接}
来源:https://github.com/angular/angular-seed/issues/239
然后您可能会收到 src refspec 错误,解决方案之一是:
也许你只需要 promise 。我这样做时遇到了这个:
mkdir 存储库 && cd 存储库 git 远程添加 origin/path/to/origin.git git 添加 . 哎呀!从未 promise 过!
git push -u origin master 错误:src refspec master 与任何内容都不匹配。 我所要做的就是:
git commit -m '初始提交' git推送原点大师 成功!
来源:src refspec master does not match any when pushing commits in git
关于linux - 如何将基于 Angular-Seed 的项目推送到我自己的 git 存储库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36776653/