git刪除遠端的commit - Linux

Table of Contents

http://ppt.cc/vT2O
請問我想將遠端的 3daf2ce eb49fde 兩個commit刪除
簡單來說就是 origin/weather 這個支線完全都不要了
我的做法是
git checkout 3daf2ce
git rebase -i 3cf7de6
然後在介面中只留下
pick 8d1fd33
結束後執行
git rebase --continue
不過看來好像不行
所以不太敢push上去
請問我是不是哪裡有做錯
或是觀念有問題
請糾正我謝謝
如果不適合在這邊問請跟我說
我自刪


--

All Comments

Carol avatarCarol2014-10-21
git push origin :weather
Iris avatarIris2014-10-24
刪除 branch 限定
Quintina avatarQuintina2014-10-26
但是這種方式刪除了branch,可是commit還會在不是嗎
我希望是連commit都沒有
Audriana avatarAudriana2014-10-30
branch刪除後沒被reference到的local commit可被git gc
Cara avatarCara2014-11-04
清掉 remote端預設好像自動會做 有誤請指正..
Kumar avatarKumar2014-11-07
是的沒錯,謝謝大家囉