Git use a summary of the problem

1、git stash pop 显示 xxx already exists, no checkout

When we first use git stash save -u 'instructions stored information' to store the changes, and then pull the code git pull, if your local changes have the new document, the remote also has a new file, and both of the same name, then apply a stash git stash pop it may be error: xxx already EXISTS, NO Checkout. New and conflicting file will be prompted.

At this point we can use:

git stash branch branchName

The above command is a new branch. It should be based on the latest version stored in the warehouse to establish a branch, and the branch has applied the latest storage (currently not verified).

After the new branch, you can apply to your store by switching branch, merging branches.

If you need to specify a stash, you can specify stash id.

git stash branch <name> stash@{1}

 

Reference: https://stackoverflow.com/questions/10508903/why-cant-stash-be-applied-to-the-working-directory/10508919#10508919

 

Guess you like

Origin www.cnblogs.com/wenxuehai/p/11448320.html