0

I just started a new branch, but I deleted there one too many files. How do I reinstate the master and delete the changes in the branch? what is the command? Or is it better to just delete the branch and create a new one instead to keep working on a branch before I merge it to the master?

Would git merge master do the trick?

4

1 回答 1

1

如果要丢弃分支上的所有更改,可以执行以下操作:

git reset --hard master

这会将您的分支重置为与您的主分支相同的状态,丢弃所有更改。

于 2013-04-18T11:42:42.317 回答