簡體   English   中英

對git push to a remote repo感到困惑

[英]confused about git push to a remote repo

我知道也許有人問過這個問題,但是我對路徑有些困惑:我有一個git用戶名user_x和git服務器:git.my_server.com,我做了如下克隆:

git clone ssh://user_x@git.my_server.com/path_to_work

我添加了一個自述文件I ADDED,提交了,然后我現在要進行推送。

git remote add origin user_x@git.my_server.com 

要么

git remote add origin user_x@git.my_server.com/path_to_work 

當我git push origin HEAD我得到:致命的:'user_x@git.my_server.com/path_to_workt'似乎不是git儲存庫的致命問題:無法從遠程儲存庫讀取。 請確保您具有正確的訪問權限,並且存儲庫存在。

還是什么? 謝謝

git remote add是將遠程GIT-Repo添加到本地副本。 這與推動無關。 克隆存儲庫后,便已設置了遙控器。

您必須執行以下操作:

git push origin HEAD

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM