#!/bin/bash # List of files to ignore ignore_files=("envfile") #("file1" "file2") for file in "${ignore_files[@]}"; do git update-index --skip-worktree $file done