On Fri, Jun 8, 2012 at 7:57 AM, Anssi Kääriäinen <anssi.kaariai...@thl.fi> wrote: > On 8 kesä, 17:28, Luke Plant <l.plant...@cantab.net> wrote: >> First, thanks so much to Aymeric and Anssi and others for the >> contribution guidelines, they're very helpful. >> >> I've got some questions that are due to my ignorance of git (I have >> managed to avoid it as something I need in daily use, I still think it's >> got a brain-damaged UI...) >> >> In this section: >> >> https://docs.djangoproject.com/en/dev/internals/contributing/committi... >> >> it's written you can use this: >> >> git push --dry-run upstream master >> >> to check outgoing changes. However for me the output of that command is >> a short and very unhelpful message, something like this: >> >> To g...@github.com:django/django.git >> 45d4331..2d5f9e4 master -> master > > The idea is you do next "git log" to see what are the actual changes. > >> The alternative for checking outgoing changes that I've found is using log: >> >> git log -p upstream/master..master >> >> However, I've found this doesn't work as I expect sometimes, because >> somehow after a pull, the branch pointer for 'remotes/upstream/master' >> has not been updated to where I expect it to be (the last commit pulled >> from upstream), but is left where it was. I've observed this several >> times. If I do 'git fetch upstream', rather than 'git pull upstream >> master', then the pointers always update, but I thought the whole point >> of doing 'pull' was 'pull=fetch then merge'. Am I doing something wrong?
Actually, I think what is going on here is that git-pull does a fetch-and-merge of whatever the branch is set to track upstream. This may not be the branch you hope/expect it to be. " When a local branch is started off a remote-tracking branch, git sets up the branch so that git pull will appropriately merge from the remote-tracking branch. This behavior may be changed via the global branch.autosetupmerge configuration flag. That setting can be overridden by using the --track and --no-track options, and changed later using git branch --set-upstream. " If you create a local branch from another local branch, I believe the new branch gets the same upstream branch that the original local branch had. To see what branch your local is tracking (if any): $ git branch --list -vv For example, my output there includes: master 76d5daa [upstream/master] Changed `manage.py shell`'s help text to reflect that it can invoke bpython. virtual_signals c8dc85d [votizen/virtual_signals: ahead 1] Clarify args If you find your local is on the wrong branch, you can set it like so: git branch --set-upstream <local branch> <remote branch> -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.