Entry tags:
Your branch is ahead of 'upstream/develop' by 540 commits.
~/dw (develop)$ git status
# On branch develop
# Your branch is ahead of 'upstream/develop' by 540 commits.
Did we ever figure out what causes this? I have a theory, but I don't really understand...
(Theory: the dwu script does "git pull --ff-only upstream develop" straight from the remote repo into the local develop branch. This doesn't update the local copy of "remotes/upstream/develop" that was created by a "git fetch" sometime in the past. This is what the current branch is being compared to. I have no idea whether this makes sense, and if so how to deal with it...)
# On branch develop
# Your branch is ahead of 'upstream/develop' by 540 commits.
Did we ever figure out what causes this? I have a theory, but I don't really understand...
(Theory: the dwu script does "git pull --ff-only upstream develop" straight from the remote repo into the local develop branch. This doesn't update the local copy of "remotes/upstream/develop" that was created by a "git fetch" sometime in the past. This is what the current branch is being compared to. I have no idea whether this makes sense, and if so how to deal with it...)
no subject
Is your upstream remote the canonical DW repo, or your fork of it? If it's your fork, you'll occasionally need to pull from the former and push back to the latter to keep them in sync. I don't use the "dwu" script so I have no idea if or how it handles that situation, but that might be what's going on?
(no subject)
no subject
I think kar has p.much nailed it -- for some reason, your upstream remote isn't getting updated with changes from dreamwidth. Bear with me while I think out loud:
"Your branch is ahead of '[remote]/[branchname]' by 540 commits" is Git's funny way of saying that, according to its current state of knowledge, your local branch currently has 540 commits that aren't present on the remote. Conversely, when Git says your branch is behind, your local branch is missing commits that are present on the remote. (And hilariously enough, it's possible to be both "ahead" and "behind" at the same time...)
When you pull commits into your local branch from dreamwidth, your local branch moves ahead of your forked branch on Github -- your local branch now has all those changes from the mainline of DW development, but your branch on Github doesn't have them yet. So if you have your branch on Github set up as the remote named 'origin', then after a pull from dreamwidth, git push origin develop will send all those commits over to it, making its contents the same as your local branch. And every time you pull in an update from dreamwidth, you'll have to push those new commits back to origin to avoid seeing the "x commits ahead" message.
I'm not sure which version of the dwu script you've got -- it's changed over time -- but the current one in the wiki does push back to the remote named 'origin'. It fetches from the remote named 'dreamwidth'. Do you by chance have a third remote named 'upstream'? If so, that might explain why 'upstream' is always behind -- it's never getting updated.
To see what remotes you have and what they're pointed at, try git remote -v:
Then you can see how the local↔remote branches are wired up for a specific remote with git remote show <remotename>:
(no subject)
(no subject)
(no subject)
(no subject)
(no subject)
(no subject)
(no subject)
(no subject)
(no subject)
(no subject)
(no subject)
(no subject)
(no subject)
(no subject)