Another noob question from a Git newbie.
I have a git repo, with two devs working on two different forks. The requirements were that everyone should be able to work independently and after some changes both would create a pull request and I would merge their work into main repo. When this has happened, both will pull in the changes from the main repo (by adding it as remote) and continue working on latest code.
My questions-
- Is this a good approach to follow?
- Should I create branches for each of the devs and ask them to commit in their own branches and later merge into master? (looks like overhead to me)
- What if both the devs want access to each others code (can they add other forks as remote repositories and then play with each others code and later try to push up into the main repo? I think it might generate conflicts and is a bad practice.. is it?)
Main repo
/ \
sub1 <--> sub2
If sub1 adds sub2 as remote repo and pulls in changes and later tries to create pull request for Main repo, there would be conflicts and other issues, right? - Any other way to manage code in situations like these?
Bonus: How to restrict access to full code base for some freelancer/other devs who might be working temporarily ? (more from a management perspective rather than code)