Login to github, go to project and click on Fork
git clone https://github.com/davidmoten/RxJava.git
git remote add upstream https://github.com/ReactiveX/RxJava.git
git pull upstream master
or
git fetch upstream
git merge upstream/master
git checkout -b 1.x upstream/1.x
git pull upstream 1.x
git branch newFeature
git checkout newFeature
git checkout newFeature
git commit -m “some comment”
git rebase -i HEAD~5
Note that fixup
is what you will use most of the time
git checkout yourBranch
git reset $(git merge-base main $(git branch --show-current))
git add -A
git commit -m "squashed commit message"
git push -f
git push origin newFeature
If you push before squashing commits you might want to make another branch and push that squashed.
Go to the fork on github and select the branch newFeature. Click on the Pull request button.
If pull request accepted then
git checkout master
git pull upstream master
git checkout master
git pull upstream master
git checkout <branch>
git merge-base <branch> master
git rebase --interactive ${HASH}
git rebase origin/master
git push -f origin <branch>
git branch -D newFeature
git push origin --delete newFeature
Go to Merge pull request button on GitHub and click on the link to the left labelled command line. The first option tells you what to do. For example:
git checkout -b maxamel-master master
git pull https://github.com/maxamel/rtree.git master
mvn clean install
git fetch upstream pull/<ID>/head:<NEW_BRANCH>
git fetch --all
git fetch upstream --tags
Tags are used by some builds to decide what version to give the current build.
git checkout master
git remote update origin
git pull origin master
git remote update
# the double hyphen ensures that upstream/master is
# considered as a revision and not confused as a path
git reset --hard upstream/master --
git checkout --theirs file.txt