mirror of
https://github.com/desktop/desktop
synced 2024-08-28 12:40:55 +00:00
we -> you
Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
This commit is contained in:
parent
de6858f714
commit
d5ec2baa3f
|
@ -30,7 +30,7 @@ Now, if we create a new branch called `feature-branch` from `C` and commit `D` a
|
|||
In the above example, `B` is reachable by `F` through the ancestral path of `F`-> `C` -> `B`, and `B` is reachable by `E` through `E` -> `D` -> `C` -> `B`. However, there is no such path to get to `E` or `D` from `F`. Thus, `E` and `D` are **unreachable** from `F`.
|
||||
|
||||
## Git Commands Use the Ancestral Path
|
||||
Some Git commands use the ancestral path to determine what to show. One of those is `git diff`, which is used to see the changes between two commits non inclusive of the first commit. If we execute `git diff A..C`, we will receive the set of changes from the commits along the ancestral path from `C` to `A` or `C` -> `B` -> `A`. Thus, we would see changes from `B` and `C`. Likewise, if we executed `git diff B..F`, you will get changes from reachable from `F`; thus, `F` -> `C` -> `B`. But, not changes from `E` and `D` as they are unreachable.
|
||||
Some Git commands use the ancestral path to determine what to show. One of those is `git diff`, which is used to see the changes between two commits non inclusive of the first commit. If we execute `git diff A..C`, we will receive the set of changes from the commits along the ancestral path from `C` to `A` or `C` -> `B` -> `A`. Thus, we would see changes from `B` and `C`. Likewise, if we executed `git diff B..F`, we will get changes from reachable from `F`; thus, `F` -> `C` -> `B`. But, not changes from `E` and `D` as they are unreachable.
|
||||
|
||||
## Merge Commits
|
||||
Now, let's say that we merge the `feature-branch` into our `main` branch. Our graph becomes:
|
||||
|
|
Loading…
Reference in a new issue