Automatically icon conflict resolver
First-time setup
- Install Python 3.6 or newer, choosing the "Add to PATH" option.
- Run `tools/hooks/install.bat` (details in the Git hooks documentation).
Once complete, the icon merger script will **automatically** run every time you git merge.
The icon merger script may not be compatible with some Git GUI tools. TortoiseGit and GitHub Desktop are known *compatible*; please report issues encountered while using these.
Use
Simply perform a Git merge (git merge or compatible GUIs) and the icon merger will run. It will show progress output, which will indicate if it was successful or if further action is needed.
For questions or troubleshooting, visit our coderbus.
Manually resolving icon conflicts (oranges's guide)
Assuming the following layout of your git repository:
- origin : points to your own fork of tgstation
- upstream : points to the tgstation repository itself
If you don't understand this, read this entire book through: https://git-scm.com/book/en/v2
git is a powertool and if you don't train yourself you will lose figurative fingers (and real code and hours of work)
that said, if you get stuck, come find us on the irc, I'll do my best to help you, assuming you can follow simple instructions
checkout your branch for the feature
git checkout {yourbranch}
Side note, if one of you actually tries to checkout a branch named {yourbranch} I'll cry, substitute your actual branch name in here
make sure you have the latest copy of your branch (in case you worked on it at work (implying you're employed lol) or something)
git pull
Copy your icon states to safety
Use dreammaker to copy your changed conflicting icon/iconstates out of the project folder to somewhere safe
YOU MUST DO THE ABOVE STEP OR YOU WILL LOSE YOUR ICON/ICON STATES
also I will laugh at you
Close dreammaker (completely quit it) (Seriously, do it, it tends to cache stuff and not see git changing files)
Also if you have the daemon running (DreamDaemon) close that, it might get in the way
Note
Follow every step in this guide, do not skip any, if you get any output you do not understand or that mentions errors contact the irc or ask for help in the code discord channel, do not blindly continue! You wouldn't put the legs on an ikea table upside down and then keep going like nothing is wrong would you?
Fetch upstream and merge
git fetch upstream git merge upstream/master #At this point git will stop and complain about conflicts in a binary file (your dmi)
Resolving conflicts
#first reset the file to match the latest on tgstation's master branch git checkout upstream/master -- path/to/conflicted/file.dmi ... repeat for each conflicted file
Open dreammaker and copy your changed icon back into the conflicted dmi's from your safe space using DreamMaker
yes it's expected your file won't be in the dmi, you just reset it, that's why you copied it out earlier to a safe location. Save and close DreamBreaker
seriously do this before using git again or you will suffer a great pain
Add all conflicted files you have resolved
git add path/to/conflicted/file.dmi ... repeat as necessary
Commit
git commit #if you use a new version of git you may be able to use git merge --continue #instead
Push
git push
but oranges, I am a brainlet and I use tortise git
Right-click on your repository and use the "start Git Bash Here"
I use github desktop because I'm even worse than that previous guy
There's no hope for you, install git-bash for windows https://git-scm.com/downloads and right click on your repository and use the "start Git Bash here" option
kraken
alt+t but you probably already knew that