Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a new Rails app using version 3.0.1 (in order to follow along with a tutorial using 3.0.1), but it didn't create a gitignore file. If I create my own, what ending should I put on the file? is it an rb file? or can you explain why it might not have created this file?

share|improve this question
up vote 3 down vote accepted

It isn't a ruby file. It is simply a list of files or directories to ignore. Simply create a file called .gitignore. There is no extension.

share|improve this answer
but rails creates the file automaticall – Michael Nov 14 '11 at 5:16
What are you talking about? You just said "but it didn't create a gitignore file" – pzkpfw Jun 13 '13 at 11:11

.gitignore is a file used by Git version control system. It has nothing to do with Ruby and you don't need to create it unless your project uses Git as a version control system. Here is more info about gitignore if you are interested:

share|improve this answer

Michael, I thought I had this issue too; maybe rails is creating the file, but it is just hidden. Make sure you are seeing all the hidden files; on Ubuntu, when the folder where your other rails folders appeared, enter Ctrl + H to toggle files being hidden/unhidden.

share|improve this answer
This is true. .gitignore is a dotfile, therefor hidden by the file manager. – iglvzx Jan 26 '12 at 8:30

I am new for Ruby on Rails. I did not have .gitignore file because is hidden. To open it on your text editor go to root dir and type .gitignore and will come out on your text editor.Good luck

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .