Fixing merge conflicts
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Fixing merge conflicts
What are the correct steps to solve a merge conflict for our environment?
The guide put on the wiki has a very big DONT DO THIS printed above it but doesn't give the correct way.
The guide put on the wiki has a very big DONT DO THIS printed above it but doesn't give the correct way.
Timberpoes wrote: ↑Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
- Steelpoint
- Github User
- Joined: Thu Apr 17, 2014 6:37 pm
- Byond Username: Steelpoint
- Github Username: Steelpoint
- Location: The Armoury
Re: Fixing merge conflicts
It varies slightly but here's the run down.
1:) Save all changes you've made, revert anything you have no intention of keeping.
2:) Right Click your -tg-station folder, hover 'TortoiseGit' and click the 'Pull' button.
3:) Using the code base remote (I named it upstream) pull the new code to the 'Master' branch, DO NOT pull the changes to the branch you are currently working on as this won't work.
4:) You'll receive a error when the pull attempt finishes, accept this and you'll see a menu allowing you to observe the changes between the two codes, yours and the new one, hit accept.
5:) From this menu you'll be displayed all the files in the code base, and any of YOUR OLD code files that are conflicting with the NEW CODEBASE files will be highlighted in red. From here simply right click any and all conflicting files and save using the new code.
6:) Hit the 'Push' button (or whatever) to save the changes.
From here you now need to go to all the files that were conflicting and re-add the code changes you added. You only have to do this for code files that were conflicted and were overwritten.
Addendum: If you have a conflicting map file what I recommend you do is copy+paste the map changes you've made into a new map files somewhere else, then when you've finished fixing the merge conflict simply take that and copy+paste it back into the map. Just make sure you're not overwriting anything by accident.
1:) Save all changes you've made, revert anything you have no intention of keeping.
2:) Right Click your -tg-station folder, hover 'TortoiseGit' and click the 'Pull' button.
3:) Using the code base remote (I named it upstream) pull the new code to the 'Master' branch, DO NOT pull the changes to the branch you are currently working on as this won't work.
4:) You'll receive a error when the pull attempt finishes, accept this and you'll see a menu allowing you to observe the changes between the two codes, yours and the new one, hit accept.
5:) From this menu you'll be displayed all the files in the code base, and any of YOUR OLD code files that are conflicting with the NEW CODEBASE files will be highlighted in red. From here simply right click any and all conflicting files and save using the new code.
6:) Hit the 'Push' button (or whatever) to save the changes.
From here you now need to go to all the files that were conflicting and re-add the code changes you added. You only have to do this for code files that were conflicted and were overwritten.
Addendum: If you have a conflicting map file what I recommend you do is copy+paste the map changes you've made into a new map files somewhere else, then when you've finished fixing the merge conflict simply take that and copy+paste it back into the map. Just make sure you're not overwriting anything by accident.
Last edited by Steelpoint on Mon Mar 21, 2016 4:36 pm, edited 1 time in total.
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Re: Fixing merge conflicts
It just says it is already up to date if I try step 3.
Timberpoes wrote: ↑Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
- Steelpoint
- Github User
- Joined: Thu Apr 17, 2014 6:37 pm
- Byond Username: Steelpoint
- Github Username: Steelpoint
- Location: The Armoury
Re: Fixing merge conflicts
Scratch that I meant you need to get the code from the "upstream" branch.
Also known as the branch the code is held for /tg/.
Also known as the branch the code is held for /tg/.
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Re: Fixing merge conflicts
But that just updates my master branch.Steelpoint wrote:Scratch that I meant you need to get the code from the "upstream" branch.
Also known as the branch the code is held for /tg/.
Timberpoes wrote: ↑Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
- Remie Richards
- Joined: Thu Apr 17, 2014 7:11 pm
- Byond Username: CrimsonVision
- Location: England, UK, Earth, Sol, Milky Way, Local Group, Virgo Supercluster, Known Universe
- Contact:
Re: Fixing merge conflicts
You mean don't pull /tg/ master to my current local branch (eg: BEES_glorsious_BEES)? if so you're totally wrong and the evidence is every merge conflict I've ever solved.Steelpoint wrote: 3:) Using the code base remote (I named it upstream) pull the new code to the 'Master' branch, DO NOT pull the changes to the branch you are currently working on as this won't work.
私は完璧
- duncathan
- Joined: Mon May 25, 2015 4:12 pm
- Byond Username: Dunc
- Github Username: duncathan
Re: Fixing merge conflicts
Yeah uh steelpoint you're SUPPOSED to pull to the current branch... NOT to master
- PKPenguin321
- Site Admin
- Joined: Tue Jul 01, 2014 7:02 pm
- Byond Username: PKPenguin321
- Github Username: PKPenguin321
- Location: U S A, U S A, U S A
Re: Fixing merge conflicts
how to fix conflicts:
1. git pull upstream master
2. git status
3. manually fix conflicts in the code
4. git add [full path and filename of conflicting files. can be found with git status]
5. commit
6. push
7. roll the dice of fate
8. your PR now has 20000 lines changed
9. close it and make a new PR
1. git pull upstream master
2. git status
3. manually fix conflicts in the code
4. git add [full path and filename of conflicting files. can be found with git status]
5. commit
6. push
7. roll the dice of fate
8. your PR now has 20000 lines changed
9. close it and make a new PR
i play Lauser McMauligan. clown name is Cold-Ass Honkey
i have three other top secret characters as well.
tell the best admin how good he is
i have three other top secret characters as well.
tell the best admin how good he is
Spoiler:
- kazeespada
- Joined: Wed Jan 21, 2015 4:29 am
- Byond Username: Kaze Espada
Re: Fixing merge conflicts
step 1. use tortoise
step 2. pull from origin master to your local master before making a new branch
step 3. make the changes.
step 4. PR it.
step 5.MERGE CONFLICTS
step 6. Pull from origin master to your local branch.
step 7. RESOLVE CONFLICTS. Go to conflicted files and right click them and select "Edit conflicts" it will open a side by side comparision. Use this to make the file most correct.
step 8. COMMIT CHANGES
step 9.Push to github branch for PR.
step 2. pull from origin master to your local master before making a new branch
step 3. make the changes.
step 4. PR it.
step 5.MERGE CONFLICTS
step 6. Pull from origin master to your local branch.
step 7. RESOLVE CONFLICTS. Go to conflicted files and right click them and select "Edit conflicts" it will open a side by side comparision. Use this to make the file most correct.
step 8. COMMIT CHANGES
step 9.Push to github branch for PR.
- oranges
- Code Maintainer
- Joined: Tue Apr 15, 2014 9:16 pm
- Byond Username: Optimumtact
- Github Username: optimumtact
- Location: #CHATSHITGETBANGED
Re: Fixing merge conflicts
Step 1. Stop using tortisegit, it's shit
Step 2. There is no step 2.
Step 2. There is no step 2.
- kazeespada
- Joined: Wed Jan 21, 2015 4:29 am
- Byond Username: Kaze Espada
Re: Fixing merge conflicts
Never had an error yet. Not sure why its shit?oranges wrote:Step 1. Stop using tortisegit, it's shit
Step 2. There is no step 2.
-
- Github User
- Joined: Tue Apr 15, 2014 11:41 pm
- Byond Username: Incoming
- Github Username: Incoming5643
Re: Fixing merge conflicts
Asking people to do all their git stuff from the command line is a great way to never get any more new hobbyist coders.
Developer - Datum Antags: Feburary 2016
Poly the Parrot - All Seeing Bird Transcends Universe, Joins Twitter.
Kofi - Make A Poor Life Choice
Good ideas backed by cruddy code since 2012!™
Poly the Parrot - All Seeing Bird Transcends Universe, Joins Twitter.
Kofi - Make A Poor Life Choice
Good ideas backed by cruddy code since 2012!™
- oranges
- Code Maintainer
- Joined: Tue Apr 15, 2014 9:16 pm
- Byond Username: Optimumtact
- Github Username: optimumtact
- Location: #CHATSHITGETBANGED
Re: Fixing merge conflicts
It's a great way to get rid of the shit ones though.
- kazeespada
- Joined: Wed Jan 21, 2015 4:29 am
- Byond Username: Kaze Espada
Re: Fixing merge conflicts
I can code better then half our coders and I use tortoise.oranges wrote:It's a great way to get rid of the shit ones though.
-
- Github User
- Joined: Fri Apr 18, 2014 1:50 pm
- Byond Username: Xxnoob
- Github Username: xxalpha
Re: Fixing merge conflicts
Are you going to list some names?
- duncathan
- Joined: Mon May 25, 2015 4:12 pm
- Byond Username: Dunc
- Github Username: duncathan
Re: Fixing merge conflicts
hahahahahahahahahahahhakazeespada wrote:I can code better then half our codersoranges wrote:It's a great way to get rid of the shit ones though.
- Steelpoint
- Github User
- Joined: Thu Apr 17, 2014 6:37 pm
- Byond Username: Steelpoint
- Github Username: Steelpoint
- Location: The Armoury
Re: Fixing merge conflicts
I guess the problem is that these things are rarely documented and I'm trying to work off of memory.
- duncathan
- Joined: Mon May 25, 2015 4:12 pm
- Byond Username: Dunc
- Github Username: duncathan
Re: Fixing merge conflicts
Yeah, better documentation is sorely needed.
- PKPenguin321
- Site Admin
- Joined: Tue Jul 01, 2014 7:02 pm
- Byond Username: PKPenguin321
- Github Username: PKPenguin321
- Location: U S A, U S A, U S A
Re: Fixing merge conflicts
okay so wait i actually have a question about this. when i do step 8 it changes like 30 dozen files and what i did last time was uncheck all but the file i actually want to fix conflicts on, but this lead to having 20,000~ lines changed on my PR. am i supposed to leave all of the files ticked or ???kazeespada wrote:step 1. use tortoise
step 2. pull from origin master to your local master before making a new branch
step 3. make the changes.
step 4. PR it.
step 5.MERGE CONFLICTS
step 6. Pull from origin master to your local branch.
step 7. RESOLVE CONFLICTS. Go to conflicted files and right click them and select "Edit conflicts" it will open a side by side comparision. Use this to make the file most correct.
step 8. COMMIT CHANGES
step 9.Push to github branch for PR.
i use tortoisegit only for committing and pushing (and i would use it for cherrypicking too but i've never had to) since the interface for those are nicer, but i use the console for everything else (with all the commands i need in a .txt file). am i a heathen or just a half heathenoranges wrote:Step 1. Stop using tortisegit, it's shit
Step 2. There is no step 2.
i play Lauser McMauligan. clown name is Cold-Ass Honkey
i have three other top secret characters as well.
tell the best admin how good he is
i have three other top secret characters as well.
tell the best admin how good he is
Spoiler:
- duncathan
- Joined: Mon May 25, 2015 4:12 pm
- Byond Username: Dunc
- Github Username: duncathan
Re: Fixing merge conflicts
You have to leave the other files ticked.
-
- Github User
- Joined: Tue Apr 15, 2014 11:41 pm
- Byond Username: Incoming
- Github Username: Incoming5643
Re: Fixing merge conflicts
when you commit in those circumstances what your telling the project is "this is how the project looks after I make my changes as well as other peoples changes compared to the previous commit". If you uncheck the other files that changed besides your own you're basically saying "My changes obsoleted everything that's changed in the meantime, get rid of it". Which is probably not true.
Developer - Datum Antags: Feburary 2016
Poly the Parrot - All Seeing Bird Transcends Universe, Joins Twitter.
Kofi - Make A Poor Life Choice
Good ideas backed by cruddy code since 2012!™
Poly the Parrot - All Seeing Bird Transcends Universe, Joins Twitter.
Kofi - Make A Poor Life Choice
Good ideas backed by cruddy code since 2012!™
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Re: Fixing merge conflicts
Having to memorize text commands because someone is too lazy to make a decent UI does not make you a good coder.oranges wrote:It's a great way to get rid of the shit ones though.
Command lines were bearable in the past because the amount of programs worked with was limited and graphics were expensive.
There is literally no excuse for not making a decent UI these days.
Timberpoes wrote: ↑Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
-
- Github User
- Joined: Fri Apr 18, 2014 1:50 pm
- Byond Username: Xxnoob
- Github Username: xxalpha
Re: Fixing merge conflicts
Yes there is, UIs are slow.
- oranges
- Code Maintainer
- Joined: Tue Apr 15, 2014 9:16 pm
- Byond Username: Optimumtact
- Github Username: optimumtact
- Location: #CHATSHITGETBANGED
Re: Fixing merge conflicts
Guys don't get all worked up about a flippant comment sheesh
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Re: Fixing merge conflicts
ohw yeah, because typing out all those commands is fast.Scott wrote:Yes there is, UIs are slow.
Timberpoes wrote: ↑Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
- duncathan
- Joined: Mon May 25, 2015 4:12 pm
- Byond Username: Dunc
- Github Username: duncathan
Re: Fixing merge conflicts
CLI - higher skill cap, steeper learning curve
GUI - lower skill cap, smoother learning curve
just use the one you prefer
GUI - lower skill cap, smoother learning curve
just use the one you prefer
- PKPenguin321
- Site Admin
- Joined: Tue Jul 01, 2014 7:02 pm
- Byond Username: PKPenguin321
- Github Username: PKPenguin321
- Location: U S A, U S A, U S A
Re: Fixing merge conflicts
mix of both is the way to go imoduncathan wrote:CLI - higher skill cap, steeper learning curve
GUI - lower skill cap, smoother learning curve
just use the one you prefer
i play Lauser McMauligan. clown name is Cold-Ass Honkey
i have three other top secret characters as well.
tell the best admin how good he is
i have three other top secret characters as well.
tell the best admin how good he is
Spoiler:
- kazeespada
- Joined: Wed Jan 21, 2015 4:29 am
- Byond Username: Kaze Espada
Re: Fixing merge conflicts
Commit changes will show that there are like 20 file changes if its larger then that then you should be updating your master more often. Commit these files as well. Also, if those files are not touched, then they will not show up on your PR. Always close DM when working with Git. DM and Git will fight each other silently for who can do what with files.PKPenguin321 wrote:okay so wait i actually have a question about this. when i do step 8 it changes like 30 dozen files and what i did last time was uncheck all but the file i actually want to fix conflicts on, but this lead to having 20,000~ lines changed on my PR. am i supposed to leave all of the files ticked or ???kazeespada wrote:step 1. use tortoise
step 2. pull from origin master to your local master before making a new branch
step 3. make the changes.
step 4. PR it.
step 5.MERGE CONFLICTS
step 6. Pull from origin master to your local branch.
step 7. RESOLVE CONFLICTS. Go to conflicted files and right click them and select "Edit conflicts" it will open a side by side comparision. Use this to make the file most correct.
step 8. COMMIT CHANGES
step 9.Push to github branch for PR.
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Re: Fixing merge conflicts
So what happens if you try the method described on the wiki?
Timberpoes wrote: ↑Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
- duncathan
- Joined: Mon May 25, 2015 4:12 pm
- Byond Username: Dunc
- Github Username: duncathan
Re: Fixing merge conflicts
It often fucks up your branch and is not worth the pain of fixing
Who is online
Users browsing this forum: No registered users