0
我有兩個git回購。一個包含一個我修改但沒有提交的文件,另一個文件不包含任何文件(它是一個裸露的回購)。我將如何將這些變更從修改後的版本推到裸回購版?我對git和unix相當陌生,所以任何幫助將不勝感激!在git中推送更改爲裸回購
[email protected]:~/cs265/lab3-git$ git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: lab3
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: lab3
推而改變? 「承諾變更」以及「不承諾承諾」?或者只是前者? – Kaz
是從裸回購克隆本地回購? (本地回購知道裸回購?) – Kaz
如果你有一個誤解,「裸回購」並不意味着*「不包含任何文件」*,但:*「包含git對象的數據庫,沒有工作樹,元文件在repo的根目錄下,而不是'.git'子目錄。「*遠程倉庫是否裸露在這裏並不重要。推動通常是做裸露的回購。如果推送到* non * -bare repo,那麼可能需要特殊處理,如果推送影響在該repo中檢出的分支。 – Kaz