
git: how to keep a forked repo up-to-date with original
Summary When working with open-source projects on GitHub, it is common practice to fork , or create a copy of, the original repository. This allows you to make changes without affecting the original repository. However, you need to make sure that your fork is up-to-date with the original repository to avoid any conflicts when you want to merge your changes back into the original repository. Below are the best practices to keep your fork synchronised with the original repository using Git on the command line. Prerequisites A GitHub account A forked repository cloned to your computer Command line Steps On the command line, verify that you are in your project repository. pwd Check your current remote repository configuration git remote -v To synchronise your fork with the original repository you must configure the original as an upstream repository of your fork. If you do not have an upstream configured, the output from git remote -v will be: origin <fork-repo-url> ( fetch ) origin <fork-
Continue reading on Dev.to Tutorial
Opens in a new tab




