← Back to Upcase

Updating multiple tags (detached HEADs)

(Jon Seidel) #1

I’m working on the AngularJS tutorial in which they’ve created a tag for each lesson. This is pretty cool, as you clone the whole repository and then just do a

git checkout -f step-1

and you’ve got the code for that lesson.

Only problem is, they have an ancient karma [test-runner] config file and each of the tags has the wrong data, causing execution problems. Right now I just copy in the correct version at each new lesson, but figured Id update the repository so that other folks won’t have the same problem. I’ve updated the code, replaced the old tag with the new commit, but can’t figure out how to get this pushed back to master… I tried the following…

  1. git clone the repo
  2. Checkout the lesson tag (git co -f step-1)
  3. Create a new branch for this (git co -b fix-step-1)
  4. Make the changes
  5. Add/checkin the changes
  6. Update the tag (git tag -v step-1 <new-commit-hash>)

All that worked just fine, but now I cannot merge the branch back into master because, of course, they’re made at different times with different state and there are conflicts…

Any suggestions?