我還在學習git的進出口,學得越多,我越喜歡,越是意識到我並不知道自己在做什麼。git commit顯示遠程源?
我有幾個分支,一個開發,主,和兩個功能分支。
我工作的一個特性分支,我想籤的發展分支。我得到一個警告,我有未提交的修改,所以我做了git commit -m'storing changes'
然後我做了develop分支檢出。
的問題是,我的承諾的特性分支,似乎已被推到產地倉庫,沒有我做的事情。
我不知道它是如何發生的。我已經通過了reflog,並通過我的命令歷史記錄,並沒有我在哪裏明確做push
我完全困惑,我的老闆會燒我的腳。
編輯補充:
這是引用日誌
4f1641c [email protected]{5}: checkout: moving from feature/X to develop
b67d265 [email protected]{6}: commit (merge): stashing
dd9294d [email protected]{7}: checkout: moving from develop to feature/X
b67d265的輸出是提交是得到了推動。我看到了(merge)
,但我認爲,如果有一個合併,它在本地autocommits ...
這裏是branch -va
develop 9b44fac [behind 8] Fixing clicking search annotation causing app crash
* feature/X b67d265 stashing
feature/forecastscroll 8211bfc Updated Forecast Slider to be based on UIScrollView
master 4a2a436 Merge branch 'master' of git://X/iOS/X
servertimedelta 72e5426 removing comment check
remotes/X_dev/develop 57f0f03 fixing lockonme not enabled for for new users
remotes/github/feature/forecastscroll 8211bfc Updated Forecast Slider to be based on UIScrollView
remotes/origin/HEAD -> origin/master
remotes/origin/develop fe64f76 Merge branch 'develop' of git://X/iOS/X into develop
remotes/origin/feature/X b67d265 stashing
remotes/origin/master 4a2a436 Merge branch 'master' of git://X/iOS/X
謝謝,我跑了那個命令,但我怎麼知道分支指向哪裏?我看到了我期望的分支,然後我看到它下面的遠程列表,但不明顯我的分支指向哪裏(我假設它們沒有指向任何地方,它們是本地的) – Alan 2011-04-26 18:14:22
因爲您知道git中的分支是一個提交的可移動指針。您當地的分支機構都是沒有「遙控器」前綴(主控,開發,功能/ X等)的分支。以「遠程/」前綴列出的分支稱爲遠程跟蹤分支,即跟蹤遠程存儲庫中相應分支狀態的分支。 您的情況遠程追蹤分支來自您連接的不同遙控器(x_dev,github,origin) – 2011-04-26 19:53:30
遠程追蹤分支僅通過推送或提取的網絡操作進行更新。即您不能通過任何其他操作(提交或合併或其他)來更改遠程跟蹤分支(例如遠程/源/特徵/ X)指向的提交ID。只取(拉)或推。 – 2011-04-26 19:58:27