0

This is my directory structure in my java application. My IDE is intellij. I don't want to push example.json to git because the filesize is large.

.
├── .idea
├── .mvn
├── src
    ├── main
        ├── java
        └── resources
            ├── example.json
    ├── test
├── target

I went through the gitignore file and saw this line: !**/src/main/**/target and tried to mimic this so that I don't push example.json. The line I inserted was !**/src/main/resources/example.json which I thought would work. However, after pushing to a test branch I saw that the example.json file was still being pushed. What is the proper way to configure the gitignore file to not push the example.json file to git?

  • You can simply go to .gitignore File in your Project and add the Files with extension that you don't want to Push eg. a.json, b.son et.c – iLearn May 11 '21 at 17:52

1 Answers1

0

In all IDE we get option to check the list of files that will checked in. We can uncheck/unselect the files that are not required and commit and push it to the repo.

Bhanu
  • 21
  • 5