如何使用Git Pull覆盖本地文件

什么时候需要覆盖本地文件? (When do you need to overwrite local files?)

If you feel the need to discard all your local changes and just reset/overwrite everything with a copy from the remote branch, then you should follow this guide.

如果您需要放弃所有本地更改,而只是使用远程分支的副本重置/覆盖所有内容,则应遵循本指南。

Important: If you have any local changes, they will be lost. With or without --hard option, any local commits that haven’t been pushed will be lost.

重要提示:如果您进行任何本地更改,它们将会丢失。 无论是否使用--hard选项,所有尚未推送的本地提交都将丢失。

If you have any files that are not tracked by Git (e.g. uploaded user content), these files will not be affected.

如果您有Git不能跟踪的任何文件(例如,上载的用户内容),这些文件将不会受到影响。

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值