Question

I am rebasing a lot of commits right now, and previously one caused a conflict in two files. I examined those and decide that I can safely use "ours (master)".

So I ran the git checkout --ours ., and the conflict files successfully used the master version.

However I just remembered that the commit also contains a few other files (not in conflict). Does my command also checkout the master version for those files (by my mistake)?

Was it helpful?

Solution

A quick test shows that a git checkout --ours . does not change files in the index (i.e. files that were merged cleanly and are ready to be committed).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top