git crate patch and check&apply patch(八)

root@vmuer-VirtualBox:/opt/myProject# git format-patch master
0001-add-c.c.patch

 

root@vmuer-VirtualBox:/opt/myProject# git checkout master
Switched to branch 'master'

 

root@vmuer-VirtualBox:/opt/myProject# git apply --check 0001-add-c.c.patch
root@vmuer-VirtualBox:/opt/myProject# git apply 0001-add-c.c.patch

root@vmuer-VirtualBox:/opt/myProject# git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)

0001-add-c.c.patch
c.c

nothing added to commit but untracked files present (use "git add" to track)

posted @ 2019-12-09 20:13  嵌入式实操  阅读(339)  评论(0编辑  收藏  举报