git apply patch,新增檔案之後只能自己手動add嗎? - Linux
By Victoria
at 2009-10-29T17:12
at 2009-10-29T17:12
Table of Contents
我使用git apply filename.patch指令來做patch
這個patch檔裡面有一段是新增檔案
長的像這樣
diff --git a/drivers/video/backlight/bl.c
b/drivers/video/backlight/tsp_bl.c
new file mode 100755
index 0000000..4ee258f
--- /dev/null
+++ b/drivers/video/backlight/bl.c
經過patch完之後,的確有檔案被新增了
但由於我是在一開始做git add .
所以後來新增的檔案就不會自動被放進index
打git diff看不到東西 除非用git diff HEAD
只好手動在patch完之後做一次git add drivers/vide/backlight/bl.c
而且也查到
git-apply - "Apply a patch on a git index file and a working tree"
不知道是哪邊出了問題??謝謝。
--
這個patch檔裡面有一段是新增檔案
長的像這樣
diff --git a/drivers/video/backlight/bl.c
b/drivers/video/backlight/tsp_bl.c
new file mode 100755
index 0000000..4ee258f
--- /dev/null
+++ b/drivers/video/backlight/bl.c
經過patch完之後,的確有檔案被新增了
但由於我是在一開始做git add .
所以後來新增的檔案就不會自動被放進index
打git diff看不到東西 除非用git diff HEAD
只好手動在patch完之後做一次git add drivers/vide/backlight/bl.c
而且也查到
git-apply - "Apply a patch on a git index file and a working tree"
不知道是哪邊出了問題??謝謝。
--
Tags:
Linux
All Comments
By Eden
at 2009-10-30T11:38
at 2009-10-30T11:38
Related Posts
新手問題 ubuntu root密碼 ??
By Freda
at 2009-10-29T10:00
at 2009-10-29T10:00
好用的影剪接軟體Kdenlive
By Annie
at 2009-10-28T23:17
at 2009-10-28T23:17
無光碟重灌??
By Connor
at 2009-10-28T22:53
at 2009-10-28T22:53
請問在workstaion RHEL4下如何設定環境變數?
By Carolina Franco
at 2009-10-28T21:16
at 2009-10-28T21:16
root 無法登入
By Blanche
at 2009-10-28T18:04
at 2009-10-28T18:04