Skip to content

Commit f3af3ed

Browse files
MetOffice#43 Adds in a section in 7 conflicts on comparing diffs across branches via GitHub
1 parent 6bbf005 commit f3af3ed

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

episodes/06-conflict.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,26 @@ The far left shows how long ago the commit was that changed those lines.
168168
Then the commit message is displayed before the file contents.
169169
Click on the little page icon after a commit message to see previous
170170
commits which altered the same lines.
171+
Try using blame on the `CITATION.cff` file to see who added
172+
the conflicting change.
171173

174+
### Compare changes
175+
176+
In the git-novice lesson we learnt how to diff between commits
177+
on the same branch.
178+
You can also look at diffs between branches even if they are on
179+
a different fork using GitHub.
180+
181+
To see a difference for a repository add `/compare`
182+
to the end of the repository url.
183+
184+
1. Navigate to: [`https://github.com/MetOffice/git-training-demo/compare/`](https://github.com/MetOffice/git-training-demo/compare/),
185+
and click on the **compare across forks** link.
186+
2. Click on the **head repository** dropdown and find your fork.
187+
3. Click on the **compare** dropdown and select your feature branch.
188+
189+
A diff should appear comparing your fork's feature branch with
190+
the upstream repositories `main` branch.
172191

173192
## Resolving Conflicts
174193

0 commit comments

Comments
 (0)