git将一个分支的某个文件合并到当前分支

有时在开发的feature中,整个分支的功能并没有完成开发完成,但是,有几个修改的基础文件需要合并到develop中,这个时候的操作步骤为:

git checkout develop     //切换到Develop分支

git checkout feature/new1.1 -- usercontroller.php  //将feature/new1.1中的usercontroller.php合并到develop分支中

git commit usercontroller.php -m 'xxx'    //提交文件

posted on 2016-01-08 12:09  mingaixin  阅读(3905)  评论(0编辑  收藏  举报