[問題] git 新手的問題 有關分支中刪除檔案
最近開始學習git
但有點搞不懂他對分支中刪除檔案的定義
我原本在 master
把一個檔案加入追蹤 ( git add test.txt )
然後commit ( git commit -m "master" )
接著創建並切換到分支 develop ( git checkout -b develop master )
然後在develop中刪掉這個檔案 ( rm test.txt )
這時候如果我不做其他事情就切換回 master ( git checkuot master )
發現master的 text.txt檔案也被砍了!?
即使我先在develop做了commit ( git commit -m "delete test" )
然後再切換回master 也一樣該檔案不見
---
我看教學上的想法是所有在develop裡面做的更動
直到我回master下git merge指令前,都不會動到master裡面的東西
請問是我的想法錯了嗎?
還是我的指令下的不對呢
--
Insanity is doing the same thing over and over again while expecting a
different outcome.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.133.61.45
→
01/30 10:14, , 1F
01/30 10:14, 1F
→
01/30 10:58, , 2F
01/30 10:58, 2F
※ 編輯: BBSealion 來自: 220.133.61.45 (01/30 11:00)
→
01/30 11:29, , 3F
01/30 11:29, 3F
→
01/30 12:29, , 4F
01/30 12:29, 4F
→
01/30 14:32, , 5F
01/30 14:32, 5F
→
01/30 15:48, , 6F
01/30 15:48, 6F
→
01/30 15:48, , 7F
01/30 15:48, 7F
→
01/30 15:49, , 8F
01/30 15:49, 8F
→
01/30 15:50, , 9F
01/30 15:50, 9F
→
01/30 15:50, , 10F
01/30 15:50, 10F
→
01/30 21:33, , 11F
01/30 21:33, 11F
→
01/30 21:33, , 12F
01/30 21:33, 12F
→
01/30 21:33, , 13F
01/30 21:33, 13F
→
01/31 12:06, , 14F
01/31 12:06, 14F
→
01/31 12:06, , 15F
01/31 12:06, 15F