0

Let's assume I have cloned a github php project(yes, php). I create a docker folder and a docker-compose.yml in the root folder of the project. I do this, so I can have a docker local developer environment setup. So this works now, I successfully can access the project locally in the browser with my docker modifications in the code base.

Now I modify code to fix some issue and create a merge request. At the same time I want to version this docker local developer environment setup that I created before, so I can use it for another merge request in the future.

So my question is: how do I accomplish not committing the files/folders that I use for my developer setup, but still version them?

As far as I asked around already, I found two solutions, and I still don't very much like them:

  1. Fork the original github repo. But then what happens when I create the merge request to the other repo? won't the developer files be in it still?

  2. Use git stash to create a patch, put it in your own repo to version, copy and apply it as needed: Export a stash to another computer

Are there better/easier solutions as this? Someone has to have been here already.

metanerd
  • 713
  • 1
  • 6
  • 21

1 Answers1

0

In a fork:
Create a commit with the changes for the merge request. Create the merge request. Then commit the changes that aren't needed in the merge request. Et voilà the request only contains what you wanted.

Or you could version locally but that kills the use of git...

NielsNet
  • 818
  • 8
  • 11