Welcome Guest, Not a member yet? Register   Sign In
Pushing only certain code to different repositories
#1

I have a Codeigniter project that needs two different repos: one for local development with my team (bitbucket) and one on my client's side for deployment (gitlab). I am looking for ways to simplify getting changes from one repo to the other.

My issue: For local development, I need files which I don't want to push to the clients server (composer, package.json, ...) and vice versa (deploy.php, yml files from gitlab-ci), but the majority of the files is the same and only changed by me and my team.

From what I have read, simply adding a second git-remote wouldn't work because I couldn't have two gitignore files. I have never worked with git submodules, but from what I understand, it would require subfolders and the files that differ between the repos need to be in the root directory. Have I understood this correctly?

Is there a way to push only certain files in certain directions/remote repos?
Reply
#2

No, as far as I konw.

1. create a branch for the client, and push the branch only.
2. create a new git repository for the client, and when you want to push, copy files that are needed from local repository and commit and push.

Why don't you want to push some files to the client server?
These files seem no harm.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB