Home > Back-end >  How to push to a git repo if on a shared development server
How to push to a git repo if on a shared development server

Time:03-14

I have my git repo cloned on my development server which myself and another developer would like to use. The issue is that because we are on a shared server, every time I change branch names, this also reflects for him and vice versa.

I am sure there is a way around this but I have no idea - I did think of having 2 sub folders within the main theme(master) which we clone as DEV1 theme and DEV2 theme as well as also creating the same branch names on git which we push and pull from each others theme folders? I don't know if this approach would work?

CodePudding user response:

Use your development server as a central repository that every developer pushes to and pulls from, but have a different (probably local) repository for your actual work. That way other developers only see the things you push, not every single branch you experiment with.

Take a look at this tutorial for more details.

CodePudding user response:

You can have:

That way, you each operate in your own folder/branch, while pushing to the same remote repository, and seeing the work from your colleague in the other folder.

  • Related