Search code examples
gitgithubgitignoregit-index

How to undo git update-index?


I just did the following to to keep a different copy of my config.php file in my localhost vs. my production environment:

$ git update-index --assume-unchanged application/config/config.php

Unfortunately, I didn't write the config.php file exactly as I should and I need to reverse this such that I can make the change, commit it, and then re-ignore the file.

How do I undo the git update-index command?


Solution

  • git update-index --no-assume-unchanged application/config/config.php
    

    Notice the --no prefix, stylistically a double negation.