Keeping a fork up-to-date on GitHub
When you are contributing to an open source repository on GitHub, you are allowed to make pull request only through forked repository. In that case, you will always need to keep your fork updated/in-sync with origin/master. You can follow below approach through command line to do that:
- Clone your fork from Origin
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
- Jump to the root directory of your cloned fork
cd {cloned fork path} e.g. cd D:\cloned\fork-repo
- Add remote from original repository in your forked repository
git remote add upstream https://github.com/ORIGINAL-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
- Updating your fork from original repository to keep up with their changes
git pull upstream master
Recent Posts
Popular Posts
-
Several times we need to email to numerous people and email content varies from person to person. PowerShell script can be an easier sol...
-
In this article i have written code samples which a developer can use to start working on JSOM ( JavaScript Object Model) in SharePoint ...
Powered by Blogger.
No comments :
Post a Comment