Unfortunately command line commands take a pretty significant amount of repetition and regular usage to sink in. I mean, I somehow managed to forget mkdir
creates a folder, so... probably better to note down the really important ones here rather than have to dig up an old Stack Overflow post every time :v
Remember git clone
creates a new folder for the cloned repo, so we don’t need to create it ourselves beforehand.
If we’ve pushed to remote, then we’re screwed. If not, then...
git reset --soft HEAD^
git reset --hard HEAD^
git reset 1f1e33
Given a project superior
and a subproject interior
which will be a submodule within the project...
git submodule add https://github.com/Sup2point0/interior
git submodule update --init
cd interior
git checkout main
git submodule update --remote
git rm interior