I bit confused on github fork
from Joseph_Boom@feddit.it to linux@lemmy.ml on 26 Jun 18:35
https://feddit.it/post/8914947

So, this is my situation: I’ve forked this repository which contains dotfile and script for hyprland. I changed some files and now, if I want to sync all the commits made on the original repository to my repository github says “This branch has conflicts that must be resolved”. My question is: can I merge only the commits that don’t conflict with my files? What else can I do?

#linux

threaded - newest

Templa@beehaw.org on 26 Jun 18:48 next collapse

You pull the origin to your fork and solve the conflicts one by one, that’s usually how it goes.

If you want to keep your files how they are you can select “accept local changes” instead of “accept incoming changes”. That’s it.

Edit: If you need something more detailed let me know, I am assuming you are using an IDE like VSCode

Joseph_Boom@feddit.it on 28 Jun 13:46 collapse

Thanks, I was able to do exactly what I wanted.

Templa@beehaw.org on 28 Jun 21:58 collapse

Just make sure things are working while doing this. Maybe accepting your changes and the incoming changes is the correct way, but you need to know what you are doing.

baronvonj@lemmy.world on 26 Jun 19:01 next collapse

You can still merge the whole upstream branch manually with a local clone, and git will stop on each conflict for you to resolve them. Then when it’s done you can push the merged branch to your fork.

velox_vulnus@lemmy.ml on 26 Jun 19:57 collapse

Use interactive merge or rebase - whatever seems fit to you.

Templa@beehaw.org on 26 Jun 20:18 collapse

If they don’t know how to solve conflicts do you think that they know the difference between merge or rebase?