上一篇的GIT文章,介绍了在自己的机器上打补丁的方法(即分机打补丁),大家做的东西总归是要合并在一起的嘛,不管需要与否,我们还是了解一下,比较好。(下述方法,可能不适用于所有情况,只是针对我们的操作进行讲解)
我们的工作环境是在Ubuntu下面。
在自己的机器上
sftp root@192.168.1.1 //链接到局域网的服务器
put /home/zhuozi/project/0001-hello.patch /home/project/ //把你要打的补丁上传到服务器上
maker: 这里可以使用scp命令来完成两台主机间的文件传输,上面的动作可以写成
scp ~/project/0001-hello.patch root@192.168.1.1:/home/project/
进入服务器项目的所在目录
git apply --check 0001-hello.patch //检查补丁是否正确
git apply 0001-hello.patch //如果补丁正确,应用此命令打补丁
git status //在服务器上查看需要补丁修改过的文件
git commit //在服务器上把修改的文件提交
这样服务器上面的补丁就打好了
I’ve said that least 775006 times. The problem this like that is they are just too compilcated for the average bird, if you know what I mean
Comment 由 a775006 — 2011-11-20 @ 17:36
I’ve said that least 2691910 times. The problem this like that is they are just too compilcated for the average bird, if you know what I mean
Comment 由 a2691910 — 2011-11-20 @ 17:36
I’ve said that least 2832922 times. The problem this like that is they are just too compilcated for the average bird, if you know what I mean
Comment 由 a2832922 — 2011-11-20 @ 17:36