You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**WARNING: This literally just takes all of one side it's not selective**.
24
22
23
+
Note: If you are unclear what `theirs` and `ours` refers to it's best to consult [the docs](https://git-scm.com/docs/git-checkout#Documentation/git-checkout.txt---theirs) before issuing any commands.
I am keeping this version for reference but I no longer think it's a good approach because it is not exactly what I think of as take theirs.
32
+
It will for example give errors for files that exist in `ours` but not in `theirs`, which kinda isn't what I want.
25
33
If you are already in the merging state and have conflicts and want to take all of ours or theirs you can use one of following.
26
-
If you are unclear what `theirs` and `ours` refers to it's best to consult [the docs](https://git-scm.com/docs/git-checkout#Documentation/git-checkout.txt---theirs) and note it matters if you are rebasing (but this section I'm talking about merging).
27
34
28
35
```sh
29
36
git checkout --theirs .
@@ -36,3 +43,11 @@ git checkout --ours .
36
43
```
37
44
38
45
You can mark all the conflicts resolved after by using `git add .` or `git add -u` to only stage tracked files.
46
+
47
+
</details>
48
+
49
+
When issuing the checkout command specify if you want `ours` or `theirs`.
0 commit comments