All the processing methods seen on the Internet are get reset -- hard, but if used in this way, the premise is that there is no local modified content.
If there are uncommitted codes locally, is there a way to cancel the code pulled and keep the local changes? As far as I know, get reset -- soft will keep the code from pulling.
Of course, it seems that there is no problem in using soft to keep the code pulled over? But there will be conflicts when pulling again.
For a local modification that has not been added, if pull succeeds (pull with local modification often fails directly), then the local modification should not have been added.
At this time, GIT stash can be temporarily stored, and then fallback. After fallback, GIT stash pop can be restored.
There is an opportunistic method. If you open the editor, you can directly use Ctrl Z to solve it
I don't quite understand your question. Can you draw a picture to describe it?
If you have uncommitted code locally, you can store it temporarily.
If there is uncommitted code locally and you pull successfully, it means that there is no conflict between your code and the code pulled down. Git helps you merge automatically. If you want to return the code after the merge, you can only compare it manually.