I have a question about the branch and master branch in the repository.
If I have 2 different collaborators working on my repository at the same time, and one of them is working on the master branch whereas the other is working on a branch itself, will there be a conflict if both collaborators push the code at the same time?
Will the master branch's pushed codes override the other branch?
Thanks!
There won't be a conflict, your post is exactly why branches are used!
The only time you'll have a conflict is if 2 people try to commit the same file in the same branch at the same time.
Taking about conflict :
Suppose A and B are two collaborators;
A working on master branch;
B working on other branch;
In such scenario conflict may come if :
Despite of being at the different branch,
A and B both are working on the same file like file.php
Taking about override
If you want to override one branch with another, You can use following command like:
git merge 'branch_name'
that will merge 'branch_name' branch with your current working branch.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.