So I’m working on a Drupal website and I want to start using git to play around with different ways of implementing functionality without destroying the old implementation (in case the new way turns out to be rubbish).
Say I pull the master from the repository on the server (the same server with the Drupal installation on it) and then make a new branch, feature1, and then decide to make another branch from that called feature1b which is implemented differently. To test my code I need it to be on the server with the Drupal installation, so I would have to commit my branch back to master on the server.
What is the best way to push both branches to the server, without them being merged to master and being able to switch between them to test?
what are you asking is:
and the answer is:
this will create branch feature1 on your remote (Drupal) server, then you can check it out and see how it works