March 16, 2014

Git Extensions中取得最新Remote Branch資訊

Git Extensions是一套可藉由GUI執行Git指令的工具,它也可以整合至Visual Studio中讓開發人員直接在VS內執行Git指令。



我將某個放在GitHub上的專案開了一個branch叫student-branch



試著在Git Extensions中透過GUI (GIT-> Checkout branch)取得student-branch並在本地端的repository建立相對應的branch,但卻看不到student-branch。


看來Git Extensions似乎不會在開啟下拉選單時即時更新Remote Branch資訊。要取得最新的Remote Branch資訊,可以command line方式(GIT-> Git bash)輸入Git指令git remote update取得更新。



若不想輸入Git指令,可以至GIT-> Manage remotes-> Default pull behavior (fetch & merge)中,點選Update all remote branch info取得更新。



可以看到,雖然透過了GUI,但骨子裡Git Extensions還是執行了git remote update指令來更新Remote Branch資訊。

No comments: