2

I'm just starting to use git and github and I need some advise. I want to create a fork of a public git repo (qemu-kvm in case you're interested). I plan to have a public version of the fork on github and a development version for our team.

I'm sure there are many ways to set this up, but git confuses me sometimes. What I'm thinking of doing is ...

Create a clone of the qemu-kvm repo on my development machine in a special official branch. Allow the team to clone this repo and commit changes into the master branch. When the master branch is stable, I would merge the code to a github branch and use this to update the code on github.

Periodically, I would fetch changes on the official branch and merge them to my github branch as required.

Does this sound sensible or is there a better way to do this? Thanks, Steve

Steve Walsh
  • 6,363
  • 12
  • 42
  • 54

1 Answers1

2

It can work, but you need to manage a special clone on your local environment.

You could simply publish on your fork a 'dev' branch and ask your developer to push directly in that branch of your fork (adding the developers as collaborators)

You would be in charge of cloning that GitHub fork and merging dev to master, making sure it is stable and based on the latest of master from the original repo (so rebasing your master branch on top of upstream/master, a bit like in "My pull request has been merged, what to do next?").
Then you can push master to your fork and make the pull request.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250