Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMatt Wilderson
1,038 PointsHow do you create a .gitignore file without the sublime method?
Can't seem to save a file as .gitignore.
2 Answers
gregsmith5
32,615 PointsFirst, try doing 'Save-As' instead of just 'Save' in your text editor. Otherwise...
In Mac OS X/Linux, you can go into the terminal and type:
$ touch .gitignore
Windows makes this a bit more complicated to do in the command line (as always...), so in Explorer you can right-click in your folder and select New > Text Document, name it .gitignore and make sure you delete the .txt from the end of the file.
Keep in mind that the period in front of the filename makes it a hidden file, so you may have a hard time finding it. Your operating system has a way of showing hidden files, and I suggest you do that.
jsdevtom
16,963 PointsHi.
The documentation for the Brackets Command Line arguments are here: https://github.com/adobe/brackets/wiki/Command-Line-Arguments
Their sites says this:
Examples
Open a file in the current folder, without switching projects:
brackets index.html
Open two files from a specific path, without switching projects:
brackets ~/Sites/index.html ~/Sites/index.css
Open the current folder as a project in Brackets:
brackets .
Open a specific folder as a project in Brackets:
brackets ~/Sites/mysite
So basically, you just need to type in brackets .
as long as you are in the write folder in the command line, you will be brought to the project folder in Brackets. From here you can just make a new file as you normally would.
Unfortunately, the ZSH terminal creates a load of errors after this (but works fine). I am not an expert (by any means) so I don't know if it is important. However, it works. Just quit out of it using Crtl + C once you go back to the terminal.
:-)