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 trial

Development Tools

i don't understand how to create a folder and a git init file in one single line of code

after did

git init
and
rm -r .git

it ask to recreate a git init into a new folder i would do:

cd
mkdir projects
/projects
git init

but it ask in one single line starting with git...

5 Answers

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

Single line, right? Try

git init projects

This line creates a new directory named projects and initializes it as git repo.

thanks :)

Challenge Task 1 of 3

Let's start by initializing a git repository inside the current folder. Type in your command below, then press Enter.

git init

Challenge Task 2 of 3

Oops! I just decided we're in the wrong folder. Let's remove the git repository we just created. Type in your command below, then press Enter.

rm -r .git

Challenge Task 3 of 3

Now that we've cleaned up, let's create a repository in a new folder. Call it whatever you'd like. Type in your command below, then press Enter.

obviously if i use mkdir projects and i press enter it take it as wrong answer

Bummer! The command begins with 'git'.

Kazi Ahmed
Kazi Ahmed
11,367 Points

git init new_project

sorry you are right not /projects but cd /projects it must be right anyway is the same, the quiz in the 3 step ask in one single line of code to do it and if i make mistake it tell to start with git

William Li
William Li
Courses Plus Student 26,868 Points

can you tell me, in the exact words, what the problem description is asking you to do?

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

Hi Daniele,

rm -r .git

This command removes the .git folder entirely, thus makes the current directory no longer a git repo; that's why you're asked to use git init again.

cd
mkdir projects
/projects
git init

also, /projects is not a valid unix command.