我使用React SPA Prerender来优化 SEO,但遇到了这个问题:
\n我有一个名为 的类HomeTitleContainer,专门用于文件Home.jsx,即主页。
import { Container } from \'react-bootstrap\';\nimport Link from \'../immutable/nav/Link\';\nimport \'./Home.css\';\n\nconst Home = () => {\n \n return (\n <>\n <Container className="HomeTitleContainer">\n Ma Th\xc3\xa9matique\n </Container>\n <Container className="TableOfContentsLink">\n <p><Link link={\'/cours\'} internalLink={true} >- Des cours de math\xc3\xa9matiques sur de nombreux sujets</Link></p>\n <p><Link link={\'/bds-de-jpp\'} internalLink={true} >- Des BDs de Jean-Petit</Link></p> \n <p><Link link={\'/jeux\'} internalLink={true} >- Des petits jeux pour s\'am\xc3\xa9liorer</Link></p> \n </Container>\n </>\n );\n}\n\nexport default Home;\nRun Code Online (Sandbox Code Playgroud)\n这是相应的 css 文件 …
我在 Git 上创建了一个新的远程存储库 ('myRepo')。我选中了“添加 README.md”复选框,这也对此“myRepo”存储库进行了提交。
然后我创建一个新文件夹,在其中添加一些文件并执行以下操作:
git init
git add .
git commit -m "init"
git remote add origin https://github.com/jozinho947/myRepo.git
# get the READ.me fetched on the 'origin/master' branch locally
git fetch
# get the READ.me merged in my local 'master' where i'm pointing
git merge origin/master
Run Code Online (Sandbox Code Playgroud)
然后我有这个错误:
fatal: refusing to merge unrelated histories
Run Code Online (Sandbox Code Playgroud)
我不明白为什么我不能这样做,以及如何解决这个问题。
我默认创建了第一个主分支。
我签出一个名为“prd”的新分支,我希望它推送到远程源,但在新分支上。
我尝试这样做:
$ git push -u origin/prd prd
Run Code Online (Sandbox Code Playgroud)
但控制台记录了:
fatal: 'origin/prd' does not appear to be a git repository
fatal: Could not read from remote repository.
Run Code Online (Sandbox Code Playgroud)
有人可以帮我解决这个问题吗?