git 如何对单独文件进行 从远端版本库获得更新
高洛峰
高洛峰 2017-04-24 09:14:01
0
1
521

用git pull 好像是全部更新,但实际是我第一次pull之后,对本地文件的冲突进行了处理,其中对某一个文件处理错误了,用原来本地的替换使用了,因此此时工作区还没提交;同时git checkout拿到的也是本地版本库上的,此时我使用git pull好像也没拿到远端的那份代码。

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(1)
大家讲道理

http://stackoverflow.com/questions/3334475/git-how-to-update-checkout-a-single-file-from-remote-origin-master

git fetch
git checkout origin/master -- path/to/file

It is recommended to search for relevant solutions on the Internet before submitting a question to avoid raising the same question repeatedly.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!