Joachim Bjørge
Joachim Bjørge

Reputation: 123

Permanently ignore local changes to tracked files

I have a folder with a template project in my repo. After push, the folder was added to .gitignore. This works great regarding new files, but it still tracks modified ones.

I know about the option to ignore changes locally with

git update-index --assume-unchanged

but I want both new and modified files to be ignored for all users of the repo.

How can i make git ignore the modified files, preferrably set in .gitignore?

Upvotes: 4

Views: 1544

Answers (1)

Stephen Feng
Stephen Feng

Reputation: 71

You can use .gitignore to ignore new files and update-index --assume-unchanged to ignore versioned files

Upvotes: 3

Related Questions