我即将部署基于AngularJS的静态站点作为与Yeoman的Github页面.部署说明的第3步告诉我要做
git subtree push --prefix dist origin gh-pages
但当我进入时,我得到了
git: 'subtree' is not a git command. See 'git --help'.
这个SO答案提供了有关如何升级到最新git-core的说明,并确保它始终升级到最新的稳定版本.
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
Run Code Online (Sandbox Code Playgroud)
运行这些命令后,我git --version确保我有最新版本,显然我做git version 1.8.3.2了输出.现在,当我尝试跑步
git subtree push --prefix dist origin gh-pages
我仍然得到同样的跟随错误
git: 'subtree' is not a git command. See 'git --help'.
最后我刚刚重新启动Ubuntu 12.10并尝试再次运行该命令,但是再一次,我得到了同样的错误.
为什么git subtree即使我升级到当前的稳定版本,命令仍然无法正常工作?
我这里有一个 github 项目页面:lwymarie.github.io/QPQ_Web/Quasars_Probing_Quasars/Welcome.html
该项目名为 QPQ_Web。其中有一个 index.html 文件,它指向子目录 Quasars_Probing_Quasars 中的 Welcome.html 文件,所有其他 html 文件也存储在其中。
我想用 www.qpqsurvey.org 替换 URL 的整个 lwymarie.github.io/QPQ_Web/Quasars_Probing_Quasars/ 部分。即我想跳过 URL 中的 Quasars_Probing_Quasars 子目录。请参阅当前的 www.qpqsurvey.org 站点以了解我的意思。
是否可以为此目的设置永久链接而不重组我的文件?谢谢。
我有一个基本的 React 应用程序。没有后端。我想在 github 页面上设置它。我看了这篇文章两次。https://medium.freecodecamp.org/surge-vs-github-pages-deploying-a-create-react-app-project-c0ecbf317089
这两次,Github Pages 都会显示 README.md 文件,而不是我的公共文件夹中的 index.html 文件。这是应用程序的文件目录的图像。有什么想法吗?
如果重要的话,这是我在 package.json 中的内容:
{
"name": "react-blog",
"version": "0.1.0",
"private": true,
"homepage": "https://jackseabolt.github.io/react-blog/",
"dependencies": {
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-scripts": "1.0.14"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy" : "npm run build&&gh-pages -d build"
},
"devDependencies": {
"gh-pages": "^1.0.0"
}
}
Run Code Online (Sandbox Code Playgroud) github-pages ×2
dns ×1
git ×1
git-subtree ×1
github ×1
reactjs ×1
redirect ×1
subdirectory ×1
ubuntu ×1