-
Couldn't load subscription status.
- Fork 0
Using Git
git remote add upstream git://github.com/pydata/pandasgit fetch upstreamgit fetch upstream
git rebase upstream/mastergit fetch upstream
git rebase --interactive upstream/masterThis tip allows you to rebase relative to upstream/master which allows you to do squash commits from the point at which your fork diverged from pandas upstream
NOTE: This only applies if you are working on a branch other than master, which could be rebased by its current owner. If you're working off of a topic branch that might be rebased by others, you might want to keep closer track of where you started and the end of your commits so you can rebase painlessly.
When you checkout the branch initially, tag it as a base commit, e.g. (assuming upstream is a remote):
git checkout upstream/some-branch
# tag base of branch
git tag some-branch_base some-branch
git checkout -b my-working-branchThen, when you want to put your commits on top of the updated branch (whether rebased or not), you can do:
git fetch upstream # update remote
git checkout upstream/some-branch # results in detached HEAD
# put your commits on top
git cherry-pick some-branch_base..my-working-branch
# delete previous branch and put your changes into the new branch
git branch -D my-working-branch
git checkout -b my-working-branch
# update the tag to refer to the new base
git tag -d some-branch_base
git tag some-branch_base some-branchgit config --list --globalgit config --global core.filemode falsegit config --global core.autocrlf input