tangowithcode / tango_with_django_2

Django 2 and Python 3: Tango With Django 2 Book Repository
Apache License 2.0
68 stars 23 forks source link

Git directory structure question #17

Open MatthK opened 2 years ago

MatthK commented 2 years ago

I just bought your book and started to go through the first steps. I setup a small Raspberry Pi as a platform and have everything up and running. I got through with Django Basics and was proud to have my first webpage running. At the end of that chapter, you suggest to get started with version control. So I studied the Git Crash Course, but now I'm kinda stuck. I'm not quite clear about how to organize the files.

Git has four separate storage locations.

My main confusion now is how to "add" files to the local repository. Do I have to just copy the files over using a cp -r ~/workspace/tango_with_django_project ~/git/rango as an initial step and then every time I make a change to any of the files in the workspace directory? And once they are copied over, I have to git add all the files?

What is the best practice to copy back and forth files from the local repository to the workspace? Using only the terminal, it seems a bit cumbersome to track all the files with changes, especially if you pull changes made by other team-members, and getting them into the workspace directory.

Either I have not found it in the book, or am I missing something trivial here?