7/27/2023 0 Comments Git add remote repo to localNow it will show the response as below and it will also include your upstream repository from your master project. To do this run the same command again as below. Now you cross-check that the new upstream repository created for your forked repo. In Opencart Project this is my upstream repository. Now Specify a new remote upstream repository that will be synced with the fork. This is our repository branch content now we have to get a project from the upstream repository This will list your forked repository response will be as below : STEP 2: List the current configured remote repository for your fork. This will move to the current working directory as opencart STEP 1: Clone your project with the command.Īfter the clone is completed then move to the Opencart folder First, change your working directory to the file location where you want to clone the project with the command. Here I have the taken example of the Opencart GitHub project. Now, let me walk you through how to sync your changes with other changes by other developers. If you don't, this will cause conflicts while you raise a PULL REQUEST. And if there are files in the local repository that do not exist in the remote repo, local files get removed Synching will override the local repository with a master remote repository. This is very much necessary if you are working in a team and the teammates are working on different aspects of the project and you yourselves are working on something,Ĭertain files will differ in both repositories as there are many other developers are merging the code upstream and your branch will not have that changes unless you sync the repository with the current upstream, so you might need to keep up with their code changes as well, this is called syncing your changes with your local and remote repo. So, Why do we need this process to be done? ** NOTE : When we made any CLONE/PULL for the first time this is not required as we do fork the repository for the first time all the content in both will be the same.** Upstream branches define the branch tracked on the remote repository by your local remote branch (also called the remote-tracking branch), the below figure will help ya'll understand. Now, you might think what is an upstream branch, Today we will focus on how we can synchronize our GitHub local repository master with an upstream repository branch of the GitHub project.
0 Comments
Leave a Reply. |