我已经将我的投资组合部署到我在a.github.io上的帐户。
我做了一些修改,但它们不会在网站上上线。事实上,即使我在visual studio上做了更改,提交部分也没有显示任何提交。
如果我提交更改,我会得到
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
modified: node_modules/gh-pages/.cache/github.com!a!a.github.io.git (new commits)
no changes added to commit
即使我在做改变。
所以我的更改不会生效。
编辑:
现在,提交起作用了,但当我推送更改时,我会得到以下结果:
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/a/a.github.io.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
发布于 2020-03-02 05:00:50
如果您做了任何更改,git状态应该会显示它们,并且您应该在某个时刻执行git add + git commit。
如果推送仍然失败,请检查git状态是否显示分支。
如果不是,则处于模式,这可以解释为什么不推送提交。
git switch -c tmp
git switch -C master tmp
这随后会将主节点重置为当前(分离头部)提交。
如果你得到:
new file...
您至少需要执行git add
+git commit
,但再次,请仔细检查当前分支。
https://stackoverflow.com/questions/60479721
复制相似问题