2016-10-28 61 views
1

我是新來的git和我這個苦苦掙扎。無法從git的分支新的文件 - 「已經起牀了最新的」

我需要從Github上分支(甚至不知道這是正確的術語)抓住一些文件。

我想:

git pull someones-project/feature/branch-123 

git merge someones-project/feature/branch-123 

,得到了Already up-to-date兩種。

但它並不是最新的。我可以在Github上看到我的本地文件丟失的文件。

任何人都可以點我在這裏向正確的方向?

+0

這是什麼混帳'顯示status'你? –

+0

@TimBiegeleisen它說'你的分支在4次提交之前先於'主'。 – MeltingDog

+0

檢查,如果你期待的文件被更新的.gitignore – Vasan

回答

3

由於mentioned here

消息「已經起牀了最新的」意味着所有從你試圖合併分支的改變已經合併,您目前所

分支

所以你master分支似乎已經從someones-project/feature/branch-123

有提交它告訴我,我是正確的(someones-project/feature/branch-123

在這種情況下,當地分支機構someones-project/feature/branch-123已經更新,任何後續的git拉或合併將始終報告「已經跟上時代的」。

由於Tim Biegeleisen評論,一個git pull應該是:

git pull # pulls from origin the same branch you are on 

或者:

git pull origin feature/branch-123 # pull the branch from the remote 
            # and merges it into the current branch 
+0

對不起,我不明白 - 我可以清楚地看到Gtihub.com上丟失的文件 – MeltingDog

+0

@MeltingDog git remote -v返回什麼?它是你正在查看的回購的網址? – VonC

+0

mycompany [email protected]:mycompany/mycompany.git(獲取) mycompany [email protected]:mycompany/mycompany(推送) 原點[email protected]:mycompany/mycompany.git(獲取) 原點git @ github.com:mycompany/mycompany.git(push) – MeltingDog

相關問題