DEV Community

Muhammad Uzair
Muhammad Uzair

Posted on

How to keep github repo general ?

Basically I wanted to have a GitHub repo which itself contain some directories for different projects e.g todo app, timer app, ... inside a repo called backend-codes.
Can anyone tell me how to do that using git ?

offcourse each directory contain its own .git file for tracking files.

for example I may want to create 30daysofcode repo which contain 30 directories each having its own .git file as well.

Took me hours but can't figured it out , at the end I manually uploded todo app folder to GitHub using GUI. repo

Discussion (7)

Collapse
dhvcc profile image
Alexey

Why don't you just use branches? Spearate branch for every project

Collapse
uzair004 profile image
Muhammad Uzair Author

Nope, branch is different thing. I want to keep repo as collection of related codes. Like this one github.com/wesbos/JavaScript30

Collapse
dhvcc profile image
Alexey

Then have one .git folder for entire repo and tag project in commit description

Collapse
itsjzt profile image
Saurabh Sharma

You can use git submodules but they are little pain to work with

Collapse
uzair004 profile image
Muhammad Uzair Author

Tried that, as u said pain. Throw error after every Operation

Collapse
uzair004 profile image
Muhammad Uzair Author

Thanks for help ☺️, will research about it, new to git so don't know much rules.