Learning how to code
Study material from 2018
Repositories migrated to subfolders on 24-06-2023
Each per directory
GitHub: moving repositories as a subfolder of another repository
Main repo: Learning-Java-Android-Studio-libGDX
Other repos: jsnake, jflappybird, etc...
Move all other repos into the main repo:
- Create an empty main repo on GitHub:
Learning-Java-Android-Studio-libGDX
- Clone it to your machine:
git clone https://github.com/dbajuliano/Learning-Java-Android-Studio-libGDX.git
- To merge any other existent repo into the main repo as a subfolder, run this command inside the main repo folder:
git subtree add -P <prefix> <repo> <rev>
git subtree add -P jsnake git@github.com:dbajuliano/jsnake.git HEAD
Note: Set <prefix>
to the name of the subdirectory jsnake
, <repo>
to the clone URL of jsnake
, and <rev>
to the revision of jsnake
you want (HEAD
if latest)
This will take the history of the jsnake
repo and merge it with Learning-Java-Android-Studio-libGDX
, along with an additional merge commit.
- Push the changes to GitHub.com
git push -u origin main
Repeat the process for any other repo to be merged.