PlaceholderGames / 2022-yr2-team-gemini

Second CS2S561 Game
0 stars 0 forks source link

Having trouble merging my branch to main #44

Open SeanLilley1 opened 2 years ago

SeanLilley1 commented 2 years ago

image

Because of an unknown issue Victor and I are struggling to merge my branch with the main branch we are not completely sure what to do other than either remaking the puzzles from scratch or reverting the latest main commit.

image

We do know that because a change made to main 2 days ago and i didn't have the pull that version i am no longer able to merge.

not sure if there is a solution to this of if i just make it again. if i do need to make it again i dont mind but would rather see if there is a solution before i do

SirJinxy commented 2 years ago

I really don't like github

30001606VA commented 2 years ago

Yeah a change was made to main and I think Sean forgot to pull before trying to push new changes. And now because GitHub is a cry baby it won't work properly.

SirJinxy commented 2 years ago

Haha GitHub is indeed a cry baby

DoctorMikeReddy commented 2 years ago

Please don’t assign me unless there’s a reason. If there is be clear what that reason is

DoctorMikeReddy commented 2 years ago

Right. It’s not GitHub. It’s that someone edited the file separately. As this is a level binary file - MainScene.Unity - you cannot easily merge it. Level files are never able to be automatically merged. Generally, I advise students to work on separate levels, or “checkout” the level, so others don’t work on it at the same time. You have two options: 1) pull the main version then reapply the changes you did again, manually 2) make a copy of yours outside the project folder, pull the one from main, then overwrite it with your copy, which will lose the changes the other person had made

This is the simplest way. The official GitHub way is to use the —ours or —theirs tag with ‘git add’ when you try to ‘git rebase main’ in your branch, or ‘git merge ’ in main to select one or other (local or remote) version of the file.

tl;dr Binary files like scene, level or map files are complex to merge

— is two hyphens BTW