I have a (main)folder 'prj' with directories and have git init
there creating a repo and added and committed all files with git add *
I have created another directory 'prj2' where I have git init
and then did a git pull
which copied everything over to 'prj2'
now when I make changes to files in the prj2 repo and commit, then do a git push
to prj(main) it gives the error:
remote: error: refusing to update checked out branch: refs/heads/master[K remote: error: By default, updating the current branch in a non-bare repository[K remote: error: is denied, because it will make the index and work tree inconsistent[K remote: error: with what you pushed, and will require 'git r.............
is this the correct way to set up a main project(prj) and a second(prj2) from which I can push to the main?
and if pushing is not possible because the main project repo is a non bare git init..etc, then how should one push to the main repo?
or is a different set up better?