As a followup to an earlier question, I'm trying to update one reference (e.g. release) to point to another reference (e.g. master).
If I have a master and a release branch, and master is a single commit ahead of release, I'd like to "fast-forward" release to master. I try this:
r = Rugged::Repository.new(".") # assume we're on the `release` branch
r.references.update(r.head.resolve, r.branches['master'].target_id)
This almost works, but leaves my repo in a state like this:
On branch release
Your branch is ahead of 'origin/release' by 1 commit.
(use "git push" to publish your local commits)
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: file
Am I missing a step? I'm expecting my staging area to be "clean".
I've tried r.index.write_tree(r) and r.index.write, but no dice.