There are several git workflows because it is a flexible tool, but a simple workflow is to have a master branch and a develop branch. You can simultaneously push and pull directly to your repo without forking on github and without having your employee constantly send Github requests.
You can make most of your local commits in the development branch, but often exit the remote development branch to merge the code with each other - at this point you can deal with merge conflicts before clicking on the remote one.
Less often, you can pull out a wizard and merge it using development. The idea is that the main branch is more stable and can be prepared for release at any time, so there is no active development on it. That is all that is needed.
If you want to go further, you can make "function branches" from your development branch, but the principle is the same - merge back up to develop, and from there "up" to master.
It is important to synchronize (combine) your work often, otherwise the differences in your individual copies of the code base are likely to be larger, which means a greater chance of conflict. If you still have conflicts, click and drag more often so that the differences are smaller and easier to handle.
Conflicts are especially likely if you both work hard with the same files. In such cases, sometimes it pays for the organization and division of work into functions that change different parts (files) of the code base, so you are less likely to step on each other.
Do not forget to commit local changes before pulling, otherwise the changes will be considered to be in the "setting" and will not be automatically combined during pulling. Fortunately, git is quite forgiving and very good at merging conflicts.
source share