I want to create a parent git repo inside which there will be multiple git repos, but I do not want parent git repo to track all commits of sub repos. Commit history can be placed in individual sub repos. I just want that When I pull from parent repo, I want all sub repos to be pulled and when I push parent repo, all subrepos committed changes should be pushed to their respective repos in server. Also it should be able to push and pull individual git repos when we make some changes to any of subrepos and next time pull of parent repo should give the updated repos.
I am trying to use submodules/subtree but couldnot achieve it. I have heard of git subrepo but have not been able to find good tutorial on it
That is exactly what git submodule does: the parent repo only records the main subrepo tree SHA1, called a gitlink (special entry in the parent repo)
Each time you are making one or multiple commits within one of the subrepo (and push back to its remote upstream repo), the parent repo won't record anything until you go back to said parent repo, add, commit and push.
But you will add and commit only one element: the gitlink, that is the new SHA1 representing the root tree of the modified subrepo.
When you clone a parent repo, do so with git clone --recurse-submodule :
That will automatically clone all the subrepo, at their exact SHA1 previously recorded by the parent repo.