Reputation: 1124
I'm fairly new to Git and I'm trying to setup a workspace and workflow. Could someone give me some advice please. I believe that with Git everything is possible but I want to follow the rules here.
So I use Github to host one public and one private repository. The public repository is my project's official code and the private one is used only by me so I can work on different computers.
I want to work as much as possible on my private repository. Here I have branches where I investigate some ideas.
When I want to release something I want to pick some commits from my private repository and merge them to public. I also want that my public changes appear as one single commit without any history.
I've been reading and I think rebase is the way to go when sending stuff into public so I can pick and squash what I want.
What do you guys think? Is this doable? or it has any major issues? I guess I could try it but I don't want to get stuck in something that isn't right to begin with.
Upvotes: 3
Views: 1170
Reputation: 2449
Everyone should read Pro Git by Scott Chacon before tackling any sort of project with Git. Without wanting to plug his book beyond a strong recommendation, he pretty much sums up this workflow on p124.
Totally doable.
Treat your private as your dev fork and your public as your production fork. Be really strict with merges between the two.
Upvotes: 5