#help (2022-07)

Where to get help about getting help!

2022-07-09

Alexander Goya avatar
Alexander Goya

I cannot get git to remove/ignore the .terraform folder I’ve added it to the .gitignore file and tried git rm -r --cached . I’ve also committed after the git rm

Jeremy (UnderGrid Network Services) avatar
Jeremy (UnderGrid Network Services)

how are you listing it in your .gitignore file? I typically use the following in mine

# Local .terraform directories
**/.terraform/*
Alexander Goya avatar
Alexander Goya

I’ve tried both .terraform and .terraform/

Alexander Goya avatar
Alexander Goya

I’ve now completely deleted the folder and committed. Also deleted all the branches besides main

Alexander Goya avatar
Alexander Goya

Still, git wants to push 130 files

Alexander Goya avatar
Alexander Goya

I just deleted the .git directory and git init‘ed again. Problem fixed

Jeremy (UnderGrid Network Services) avatar
Jeremy (UnderGrid Network Services)

sounds like you already had the .terraform directory committed to the repo before adding to the .gitignore. In this case it will not ignore them as they’re already part of the repo history.

    keyboard_arrow_up