I have worked with CVS, SVN, Mercurial... but everytime I try do something with GIT I seem not to understand its philosophy.
I have a private Rhodecode server, where I wanted to have a copy of a public git repository.
Performed the following steps:
- I cloned the public repository
- Copied it to my rhodecode server into an empty git repository
- Did a git clone on another machine
- Created a branch and did some modification
- Commit
- Push: "Refusing to update branch in a non bare repository"
If I clone as a bare repository I do not have a working copy, so this seems no solution either.
Why am I not able to push my changes to the server ? Is there another working flow for getting a public repo into Rhodecode ?
There are some git options you can change to ignore this error, but I have a feeling this is not a proper solution.
In something like Mercurial this is not problem, but GIT is rather cryptic.
The question from Igal S shined me a light.
There is a lot of confusing information on the internet related to bare and non-bare git repositories. Actually it seems the concept is simple: A bare repository does not have a working copy and is the type that should be on a remote server where you want to push changes.
The soludion was simple:
After this it worked as expected.