I've been working for a while with git and multiple remote repos, cloned form a bare-repo. So, I could commit changes on one repo, push to the bare and fetch/merge into the other repo.
On a new, small project, I was developing on a single local repo in directory "projectx". I just decided to create a new development repo on the same server, different diretory called "dev". I cloned the repo from "prod" into directory "dev". I made some changes in "dev" and commited them.
I now wanted to copy the changes from "dev" into "prod", but git refused to to the push. I read about receive.denyCurrentBranch updateInstead
, but I'm unsure this is the best way.
Is this just a bad idea and I'd be better off creating a bare repo in this case too? Or is there a way to work on one repo, commit, and eventually "copy" to the other repo?