Ignoring anvil.yaml in a push to Github

What I’m trying to do:

Have changes to anvil.yaml ignored when pushing to Github from a local repo.

What I’ve tried and what’s not working:

Going from Handling anvil.yaml in a git workflow I have tried the following steps:

  1. Clone a project on Github to my local machine
  2. Run the git update-index --skip-worktree anvil.yaml command on the repo on my local machine
  3. Add an Anvil app as a remote
  4. Do an initial force push to the Anvil app
  5. Do some changes to the Anvil app that would update anvil.yaml (updating dependencies)
  6. Pull those changes from the Anvil app to my local repo
  7. Push to Github

I’d assumed the changes to anvil.yaml would not be pushed. But clearly I did something wrong, since the changes to anvil.yaml were pushed to Github.

Has the way to ignore changes to anvil.yaml changed in the three years since Owen’s post? Or did I muck it up in some fashion?

This is untested, but you could try the suggestion on this page:

Thanks for the link! Looking through some posts by people who’ve played with both, it seems like assume-unchanged is a more temporary flag that can get cleared on a pull, while skip-worktree is supposed to be permanent. git assume-unchanged vs skip-worktree: fallengamer — LiveJournal

Looks like I need to look more into what the flags actually do. The analysis only talks about pulls, not pushes.

1 Like