bier hier
bier hier

Reputation: 22570

How to permanently not stage a file?

In my project I have a config file that I do not want to stage. How can I make sure it does not get staged even when I do git add . ?

Upvotes: 1

Views: 177

Answers (1)

blue112
blue112

Reputation: 56582

Ignore it :

If it's a file nobody wants in your team

Create a file named .gitignore at the root of your project, add the filename into it, and commit it (the .gitignore file).

If it's a file only you don't want

Edit the file named .git/info/exclude and add the filename into it.


More information is available here : https://help.github.com/articles/ignoring-files/

Upvotes: 5

Related Questions