I have an app built in Django and hosted on Heroku. My app uses Heroku Pipelines, and yesterday I promoted my code to production after testing it in staging. A bug popped up this morning, so I decided to check the code in my local heroku branch. (BTW, I have a passable understanding of Git. Usually I can get it to work without major problems, but there is much I don't understand.) When I checked out the branch, I saw this message:
Your branch is behind 'origin/heroku' by 4 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
I should mention that this is the first time I have checked out this branch. When I tried to perform a git pull, I got another message:
Your configuration specifies to merge with the ref 'refs/heads/heroku'
from the remote, but no such ref was fetched.
After a ton of googling, I discovered that this has happened to others. The fixes I found (here, here, here, and here), however, don’t seem to apply to my situation. These answers (here, here, and here) get closer, I think, but I don’t quite understand how to apply either solution to my error.
Here’s my .git/config:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = https://some/project/on/github.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "heroku"]
remote = origin
merge = refs/heads/heroku
[remote "heroku"]
url = https://git.heroku.com/project-name.git
fetch = +refs/heads/*:refs/remotes/heroku/*
[branch "stripe"]
remote = origin
merge = refs/heads/stripe
Questions 1) With Heroku Pipelines, how can the commits from staging be different from those in production? Maybe they aren't? 2) How do commits get ahead of master in the first place? This has happened in my other branches on occasion, but I'm never clear why or how they happen. 3) What is supposed to be merged with the ref? I’m not entirely clear on what the expectation is there. Is it expecting HEAD? 4) Why wasn’t the ref fetched and from where should it have been fetched?
Thanks for any ideas on how to proceed!