Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend zdiff3 instead of diff3 as merge.conflictstyle #291

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

NicoWeio
Copy link
Contributor

Quoting from The GitHub Blog:

The default value for this configuration is “merge”, which produces the merge conflict markers that you are likely familiar with. But there is a different mode, “diff3”, which shows the merge base in addition to the changes on either side.
Git 2.35 introduces a new mode, “zdiff3”, which zealously moves any lines in common at the beginning or end of a conflict outside of the conflicted area, which makes the conflict you have to resolve a little bit smaller.

The blog also includes a simple example.

@jpwgnr
Copy link

jpwgnr commented Mar 21, 2022

Sounds cool!

@maxnoe
Copy link
Member

maxnoe commented Mar 21, 2022

Git 2.35 is relatively new and probably won't be in many distributions in time for the next Workshop.

Will ubuntu 22.04 and does Fedora 35 have it?

@jpwgnr
Copy link

jpwgnr commented Mar 22, 2022

Git 2.35 is relatively new and probably won't be in many distributions in time for the next Workshop.

Will ubuntu 22.04 and does Fedora 35 have it?

I wanted to suggest to install anyway git via

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt install git

because the offical Ubuntu git release is way behind. The

git config --global init.defaultBranch main

isn't working there as well which could also be nice to add in the manual.

@maxnoe
Copy link
Member

maxnoe commented Mar 22, 2022

@jpherdi Since at the next workshop, we'll have 22.04 as current LTS, that might not be necessary.

I'd rather people update the OS than install ppas :D

@NicoWeio
Copy link
Contributor Author

Will ubuntu 22.04 and does Fedora 35 have it?

Fedora 35 has it.
Ubuntu 22.04 won't, AFAICS.

@SepplL
Copy link
Contributor

SepplL commented Aug 6, 2024

With all OS's and Repos more up-to-date: Do we still want that change? I guess now we can just include it without worrying about local git versions.

@LuckyJosh
Copy link
Contributor

The current LTS Version of Ubuntu has git 2.43
https://packages.ubuntu.com/noble/git

so its fine to add this I guess 👍

@SepplL SepplL merged commit 3399c66 into pep-dortmund:main Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants