Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git directory structure question #17

Open
MatthK opened this issue Aug 17, 2022 · 0 comments
Open

Git directory structure question #17

MatthK opened this issue Aug 17, 2022 · 0 comments

Comments

@MatthK
Copy link

MatthK commented Aug 17, 2022

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.

  • The workspace to have the Django project files. So I assume this is the ~/workspace/tango_with_django_project directory
  • The local repository. I created a ~/git/rango directory and used that to git clone the repository created on https://github.com/
  • The remote repository, created on github.com
  • The local index

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant