Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Make sure you have 2 origins (your forked project and project from which you forked)
- $ git remote -v
- # origin git@github.com:a-LERT/schoolTest.git (fetch)
- # origin git@github.com:a-LERT/schoolTest.git (push)
- # upstream git@github.com:begin29/schoolTest.git (fetch)
- # upstream git@github.com:begin29/schoolTest.git (push)
- # If you have only one add it
- $ git remote add upstream git@github.com:begin29/schoolTest.git
- # fetch fresh changes
- $ git fetch upstream master
- # merge it to forked repository
- $ git checkout master
- $ git merge upstream/master
- # checkout to own feature branch and rebase(merge) new changes to it
- $ git checkout my-feature
- $ git rebase master
- $git log
- #now you will see your changes with fresh changes from repository which you forked
- # if you will get conflicts after rebase
- # fix conflicts and add it to git status
- $ git add file1 file2 # or `git add .`
- $ git rebase --continue
- # it will merge your and other commits with resolved conflicts
- # if something went wrong you within rebase process
- # you can abort rebase
- $ git rebase --abort
- # you will have sate before rebase
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement