Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript npm Basics (retiring) Installing Packages with npm Managing Dependencies in the package.json File

can not change the name of gitignore.txt to .gitignore on mac OS

searching about this issue I was not able to find a solution for this problem. Any ideas....

I get this message on mac: you can't use a name that begins with a dot ".", because these names are reserved for the system. Please choose another name.

I don't have a Mac but I do use Linux and I've been told it's similar. Can you go into the terminal and use a command line to copy the file and use .gitignore as the new file name? For example in Linux we can go into the directory that has the file and to copy it we would do: cp gitignore.txt .gitignore

That would create a new file name .gitignore in the current directory.

1 Answer

Robert Schaap
Robert Schaap
19,836 Points

If you haven't already just copied the content and pasted it in a new .gitignore file, try going into your terminal to the folder where it's located and doing mv gitignore.txt .gitignore, that should work.