Answer the question
In order to leave comments, you need to log in
Git and two repositories (public and private)?
What you need:
1. To develop in a closed repository (access only for developers).
2. Make another public repository (on github), where periodically upload all the accumulated updates and at the same time there should be only a part of the project. Also periodically updated from there (merge-requests).
For example:
apps/
publicapp/
privateapp/ — this folder should not end up in the public repository
. a new application is being developed for some time and let's say 50 commits are made, and so I want it to get into the public repository on github with one commit.
Now svn is used as a private repository, and github is used as a public one, for which .gitignore is locally configured for folders that should not go there, i.e. svn checkout and git clone are done in one folder, and when I need to put changes on github, I just do git commit and git push.
I have long wanted to get rid of svn and use git for development, but I don’t know how.
Please tell me the best way to organize the above.
Thank you!
Answer the question
In order to leave comments, you need to log in
uh,
git remote add origin YOUR_PRIVATE_REPO
git remote add public GITHUB_REPO
git push -u origin - commit to a private repository and make it default
git push public - commit to github
So all commits will get to the github. Is not it so? And how then will the problem be solved that part of what I commit to a private repository should not get on github?
Make a separate project on github, it contains a sh-script that merges the latest version of your project into some folder, transfers what you need to the root and commits with the desired message.
You will be able to track in the log both "updates" of the version and changes to the script itself (if it needs to be changed).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question