sf-inc / music_control

More control over Minecraft musics!
https://modrinth.com/mod/music-control
MIT License
6 stars 6 forks source link

Update to 1.20.2 #42

Closed TechPro424 closed 11 months ago

TechPro424 commented 11 months ago

Simple update, all I had to do was update dependencies Fixes #41

charlyb01 commented 11 months ago

Hello, thanks for your work!
And thanks a lot for splitting your work into different commits, I appreciate that. However, it looks like your second commit should be dropped, as it's adding in double the whole src directory within remappedSrc one.

Also, please note that I will first merge the other PR, which requires more attention. I should be able to merge these two very soon though

TechPro424 commented 11 months ago

Take your time, no hurry!

TechPro424 commented 11 months ago

Done Also added remappedSrc to .gitignore so this issue does not occur again

charlyb01 commented 11 months ago

Thanks for the gitignore add! Lastly, I'd like you to just drop your commits adding and removing the directory. It is not necessary in the commit tree. You can do that with an interactive rebase, with drop for both commits and it should work fine.

TechPro424 commented 11 months ago

I have no idea what an interactive rebase is 😅 Could you send me the commands I need to run?

charlyb01 commented 11 months ago

git rebase -i HEAD~5

You should remember this command, it is really powerful and very useful. This allows you to interactively rebase your last 5 commits (you can of course change the number).

But what is an interactive rebase. Rebasing is the action of moving commits, for example you could fetch origin/main in your branch with git pull --rebase origin main and all your commits would end up being committed after the new changes from the main branch, if changes were made. This avoids writing merge commits. You can also try this if you want, you shouldn't have merge conflicts.

Here the interactive rebase allows you to do many actions on your last commit. It is interactive as it will open your configured text editor and allow you to do some editing.

The things you can do are well self documented when running the command. In your case, this is simple. You want to drop commits (removing them). So you should replace the pick keyword from each line you don't want to pick, with drop if you want to drop them for example. As your second commit removes what the first added, it might conflict if you drop both in the meantime, I don't know. If it does, you can abort the rebase with git instructions, and simply drop them one by one (starting with the one removing the folder, then the one adding it).

Hope that's clear :)

TechPro424 commented 11 months ago

Ok I've replaced pick with drop in the 2 commits Now what do I do to execute the rebase?

charlyb01 commented 11 months ago

Just like when you write a commit message in your text editor: you need to save it, then exit. When exiting, the git rebase will execute and tell you if everything went well or not.

Note that when done, your history is rewritten. So, you can't just push if your commits were already push before (this is your case). Instead, you need to force push to allow rewriting history. git push -f

TechPro424 commented 11 months ago

Whenever I run the command the interactive rebase opens in the terminal I have no idea how to save and exit I try closing the terminal window but that just saves the progress

charlyb01 commented 11 months ago

git config --global core.editor your_editor to change the default editor to whatever you know how to use. You should do your commits this way, and not using the -m option to be able to do multi line commits 😉 for some editor that aren't terminal editors, like vs code, you may need to add --wait. Don't hesitate to check on the net

TechPro424 commented 11 months ago

Seems to have worked!