[英]Why does Github not show my Git edits?
昨天,我從家用計算機對Github上的項目進行了一些更改。 現在,我剛剛從工作計算機對同一項目進行了一些新更改。
我試圖用git push
提交和推送,但是git說:
error: failed to push some refs to 'https://github.com/...'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. If you did not intend to push that branch, you may want to
hint: specify branches to push or set the 'push.default' configuration variable
hint: to 'simple', 'current' or 'upstream' to push only the current branch.
所以我不得不使用以下命令:
git push --set-upstream origin BEHST;
一切順利,但我在Github網頁上看不到我的更改。
有人知道為什么嗎?
如何將git更改傳播到我的Github網頁?
您是否在推送之前更新了項目代碼?
在推送任何內容之前,您需要git pull origin master
。
我認為您使用Origin作為遙控器的名稱。
您需要先進行推送,然后再進行推送,以使本地存儲庫保持最新狀態,然后再進行推送。 這有助於在本地解決沖突。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.