git如何拉去开发的 最新代码,git:我如何获得我的代码的最新版本?

I'm using Git 1.7.4.1. I want to get the latest version of my code from the repository, but I'm getting errors ...

$ git pull

….

M selenium/ant/build.properties

….

M selenium/scripts/linux/get_latest_updates.sh

M selenium/scripts/windows/start-selenium.bat

Pull is not possible because you have unmerged files.

Please, fix them up in the work tree, and then use 'git add/rm ' as appropriate to mark resolution, or use 'git commit -a'.

I've deleted the local copies of the files the tool is complaining about, but I still get the errors. How do I check out the latest version from the remote repo? - Dave

解决方案

If you don't care about any local changes (including untracked or generated files or subrepositories which just happen to be here) and just want a copy from the repo:

git reset --hard HEAD

git clean -xffd

git pull

Again, this will nuke any changes you've made locally so use carefully. Think about rm -Rf when doing this.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值