I want to realise the following scenario:
Currently I have an application running on my server for which I yet do not use Git.
I want to setup a bare-repository on my server, so that changes that I push automatically become productive code. Additionally I want to host a project on GitLab hosted by my university for version control and collaborative development as a second remote repository.
My idea would now be the following:
- Setup the existing directory as the working directory of the bare repository.
- Pull the files to my local repository.
- Create a project on GitLab
- Push those files to the GitLab project
From there on my workflow would be that I would locally work on changes and that I push them to both remote directories.
My questions:
Step 2 does not seem to be possible - my search yields that I can't pull the files in the sense that I get the working files directly in my local working directory as I would with a non-bare repository. Is there a simple way to do this?
Does this workflow even make sense? I'm new to using Git and open for any suggestions.