Last active
April 23, 2019 13:28
-
-
Save nonproto/9839643c0bafc9e6de7816b0a3b12eae to your computer and use it in GitHub Desktop.
Random Git Commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Keeping a fork up to date | |
#1. Clone your fork: | |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git | |
2. Add remote from original repository in your forked repository: | |
cd into/cloned/fork-repo | |
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git | |
git fetch upstream | |
3. Updating your fork from original repo to keep up with their changes: | |
git pull upstream master | |
Keep Pull Request up to date with rebase: | |
Do some work on a branch. When it's done, you'll probably find that you've fallen behind the main code base. Here's how to get it up to date: | |
git remote add upstream https://github.com/hrydgard/ppsspp.git (if you haven't already) | |
git fetch upstream | |
git rebase upstream/master | |
git submodule update | |
(fix any conflicts) | |
git push -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment