简体   繁体   中英

git sparse checkout - can't abort merge

Using git 2.25.1 Used git sparse-checkout init/set to setup sparsecheckout.

Now I'm in situation that i need to abort merge.

Tried:

git merge --abort 

Entry 'QStreams_xxx/infra/QPrism/Qpvc/gradle_pvc/gradle_pvc.iml' not uptodate. Cannot update sparse checkout. fatal: Could not reset index file to revision 'HEAD'

Tried:

git reset --hard

Same error message.

Tried to disable sparse-checkout

git sparse-checkout disable

Error:

error: cannot disable sparse-checkout: You have unstaged changes. error: additionally, your index contains uncommitted changes.

In there any way out of this ?

Thanks Boaz

Not sure if it is the best flow, but a least it lets me some way out ...

git read-tree --restore HEAD
#now usual cleanup
git restore .
git clean -xdf

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM