0

I have a folder in my Git directory that stores information about when my program runs and I don't want this information to keep getting added to the repo.

Currently I just avoid selecting files from this folder in the git gui. This can be very cumbersome however as there are often a lot of them. What is the best way to do this either using the gui or the command line?

1
  • 1
    You can read more about gitignore at the docs. Commented Jul 14, 2013 at 17:57

2 Answers 2

6

Use the .gitignore file, note that you might have to exclude files with

 git rm --cached filename

from tracking, which were put there before you added the rule for them, see https://help.github.com/articles/ignoring-files

Sign up to request clarification or add additional context in comments.

Comments

2

Put the path to that directory into the .gitignore file, like this:

echo 'ignored-files/' >>.gitignore

Put the .gitignore file under version control if other developers might want to ignore those files as well.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.