Closed TechPro424 closed 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
Take your time, no hurry!
Done Also added remappedSrc to .gitignore so this issue does not occur again
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.
I have no idea what an interactive rebase is 😅 Could you send me the commands I need to run?
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 :)
Ok I've replaced pick with drop in the 2 commits Now what do I do to execute the rebase?
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
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
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
Seems to have worked!
Simple update, all I had to do was update dependencies Fixes #41