English 中文(简体)
吉唐:如何超越当地的变化?
原标题:Git: How to overwrite local change?
  • 时间:2010-11-01 11:28:07
  •  标签:
  • git
  • restore

我使用阴道,我删除了某些档案和材料;修改了一些档案。 现在我想保留我的当地法典和计划;恢复原样。 是否有实现这一目标的指挥?

最佳回答

If you want to save you changes first, you can commit them before and then checkout you code to previous commit(s): git checkout HEAD^ (one commit back) git checkout GEAD~2 (2 commits back)

或者,如果你再不需要改动,则管理<代码>git reset --hard HEAD。

问题回答

<代码>giteckout <name of file>

如果你想要从整个存放处检查,那么从根名录的用途来看。

www.un.org/Depts/DGACM/index_spanish.htm www.un.org/Depts/DGACM/index_spanish.htm

专门指挥部门通过推翻当地所有变化来拉开所有变化:

git reset --hard HEAD
git pull

你可以消除这一指挥部在当地发生的变化。

git clean -f

并通过:

git pull




相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签