![]() ![]() Two Ways to Sync A Repo - Command Line and on GitHub You can also see that this fork is BEHIND the parent repo by 1 commits. Notice that you can tell by the upper left hand corner of the repo that this fork is owned by lwasser. Your repo being in sync refers to your fork having all of the commits or changes to the code and files that have been made to the parent repo. It is important to ensure that your fork is in sync with your colleague’s repo, ideally before making a new pull request to that repo. Your colleague and others in your group may be updating code while you are working. Your colleague’s repo is the final home for the code and content that you are working together on collaboratively. Pretend that you are working on a fork of your colleague’s repo. An Example Workflow Where Syncing Is Important If you sync your files regularly, you will ultimately reduce the risk of a merge conflict. When git does not know how to resolve a conflict, it will ask you to manually fix the conflict. which changes to keep and which to remove). Git does not know how to resolve the conflict (i.e. Syncing Your GitHub Repo Reduces the Chances of a Merge ConflictĪ merge conflict occurs when two people edit the same line in a file. ![]() Keeping your fork in sync with the central repo will reduce the risk of merge conflicts (a topic that you will learn more about in a later chapter). It is important keep your fork up to date or in sync with those changes as you work. When you are collaborating with others on a project, there are often changes being made to the repo that you (and others) are contributing to. Update your local clone of your forked repository (repo) using git pull. ![]() Sync your fork of a GitHub repo using. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |