In looking, the link it appears my question is still there. What purposes the Master (local) serve. The source of truth appears to be the remote/Origin which is the Azure DEVOPS GIT.
Now when I clone the remote/Origin I am basically taking a "copy" (clone. :-) ) and taking it local. I then do a modification and I would create a feature branch...do the work and then issue a PULL request which updates to the feature branch of the remote/Origin when once the PULL request is completed it then goes into the remote/Origin Master.
Is that correct because if so...there was nothing ever done for the Master (local)?
Also, I don't get why it's said this is no central repository and it's distributed. The remote/Origin being the source of truth is a location that everybody clones from, right? So that source of truth is a tangible asset (i.e. where the code source) and it's in a central location as others are getting from it.
I hope you can clear some of this up.
- Yes. And source of truth keeps changing the role. Also think of a team (not an individual) contributing to the repository. Let's say Dave had to change a method and update its signature to support 2 more parameters (He did to accommodate a change request) hence his local repository is the source of truth for that particular file(s).
Now when I clone the remote/Origin I am basically taking a "copy" (clone. :-) ) and taking it local. I then do a modification and I would create a feature branch...do the work and then issue a PULL request which updates to the feature branch of the remote/Origin when once the PULL request is completed it then goes into the remote/Origin Master.
Pull down any changes other people have made from the central server.
Make your changes, and make sure they work properly.
Commit your changes to the central server, so other programmers can see them.
If one is relying off a person's Local Master (Cloned) if something happens that is so irresponsible - everybody will have their own cloned version and changes they have done. Yes, you could get the version from the time of the clone and all. However, that is as irresponsible as not having the source code repository (i.e. TFS) not backed up.Agreed. But shit happens you know.
Origin\Master refers to the repo that you cloned from. Master refers to your local Repo. Another suggestion, If you are using Git in Azure DevOps,
When you do a Pull, remote version of the tracked files are copied to local versions.
I am not sure about what do you mean by using the browser for approving pull requests. Please elaborate.
If you are a developer and working in a team you will get the latest code from Origin/Master (At the start of the day) which will overwrite Master (Your Local files). And if everything goes fine, you will push some changes back to Origin\Master (could be end of the day, could be in 15 minutes or could be after a week).
To answer your branching query, I suggest you take a look at this blog: https://nvie.com/posts/a-s
Regards,
Chinmay,