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 trialjazmin
11,108 PointsHow do I make this work outside of Workspaces?
I am a total tech newbie, so hoping for some help with what's happening in the background of this lesson. My program's teachers have encouraged us to work out these lessons outside of Workspaces, but I'm not sure I understand how.
I don't understand how we can apply these same commands outside of Workspaces because I don't know how to arrange or find the files. When she uses the * to add all the python files, where is she pulling them from and how does the system know where to pull those files from?
If I use the mkdir command, where does that directory go on my computer? Can I direct where it goes? How?
Sorry to ask so many questions, but if I can squeeze in one more, I'm curious why she uses the terminal instead of using git? Is it the same result either way?
TIA!
1 Answer
Eric M
11,546 PointsIf you're in a terminal you'll be in a particular directory, they generally start in what's called your home directory. For instance if I open either of the Windows terminals on the computer I'm on right now (cmd or PowerShell) they'll show me
C:\Users\emck>
If I was on a Linux or similar system it would be something like
/home/emck
but it might be displayed as
~emck$
This is the working directory. You can find out what directory you're in by typing pwd
or print working directory (doesn't work in cmd).
So if you run the mkdir
command, let's say we run mkdir new_folder
, a directory called new_folder will be created in your current working directory.
But you could also run mkdir D:\new_folder
or mkdir /usr/tmp/new_folder
which would create the new folder in those other locations (provided those locations are valid).
Similarly, *
is a wildcard character that is interpreted by certain commands as being "match anything". Take ls
a command that lists whatever's in the directory you specify, or if you don't specify a directory it lists whatever is in the current working directory.
If I want to list all the python files in the current working directory I could type ls *.py
if I want to list all the word documents I might use something like ls *.doc*
. Play around :)
git is a command line (or terminal) program, so using git by typing commands into the terminal is using git. Github is a website that hosts projects utilizing git source control, they're often conflated in discussion so it's easy to be confused. There are also sites like BitBucket and GitLab that do similar things to Github. You can also just run git locally on your computer for version control (but you probably still want to back it up somewhere)