we -> you

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
This commit is contained in:
tidy-dev 2022-08-29 05:35:23 -04:00 committed by GitHub
parent de6858f714
commit d5ec2baa3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: