My organization created a private GitHub repository for us to store our source files, documentations and various other bits and pieces. BY "us", I mean two people (for now), me and another one of our team members. How should we sync our work so that we don't get any conflicts? As we can't fork the repo, the flow isn't being very clear to me. I thought of both creating a separate branch of our own and then opening a PR to the master branch, whenever necessary. Is there any other way to handle this more efficiently?
You don't need a fork to "avoid conflict".
Or even branches.
The only way to be sure and have no conflict is a good inter-team communication, in order for each collaborator to work on different files.
That way, you can push without conflict.
You might have to git pull --rebase
before your push if your colleague has already pushed first on the same branch, but if you have modified different files, you won't get any conflict there.
(see also "Can “git pull
” automatically stash and pop pending changes?")
Once your team grows, and the topics become more inter-related, then yes, branches or fork can help.