我在 git 中有一个超然的头脑。我没有兴趣进行任何提交或保存任何更改,我只想去我的分支的头部位置。我试过他的命令,但它不起作用:
git checkout MyBranch
有什么帮助吗?
- - 更新
当我尝试结帐时,我收到以下消息:
$ git checkout -f master
Switched to branch 'master'
Your branch is behind 'origin/master' by 6 commits, and can be fast-forwarded.
--- update 2 它说有一些变化,我怎样才能删除它们?
$ git merge origin/master
Updating fb5972a..28c2849
error: The following untracked working tree files would be overwritten by merge:
---
Please move or remove them before you can merge.
Aborting
我怎样才能丢弃它们?
这些命令不起作用:
$ git checkout -- .
$ git stash save --keep-index
No local changes to save