[英]Unable to commit and push back changes made by github action (invalid user)
[英]Unable to Commit Changes to Github Pages
我已將我的投資組合部署到我在 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.
如果您進行了任何更改, git status 應該顯示它們,並且您應該在某個時候完成 git add + git commit。
如果推送仍然失敗,請檢查您的 git status 是否顯示一個分支。
如果不是,則您處於分離的 HEAD模式,這將解釋為什么不推送提交。
git switch -c tmp
git switch -C master tmp
然后將 master 重置為當前(分離的 HEAD)提交。
如果你得到:
new file...
至少你需要做一個git add
+ git commit
,但同樣,再次檢查當前分支。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.