DjangoGirls / tutorial

This is a tutorial we are using for Django Girls workshops
http://tutorial.djangogirls.org/
Other
1.53k stars 1.86k forks source link

git add --all adds too much to the Django git repo #1027

Open pts opened 7 years ago

pts commented 7 years ago

https://tutorial.djangogirls.org/en/deploy/ has:

$ git add --all .
$ git commit -m "My Django Girls app, first commit"
...
$ git remote add origin https://github.com/<your-github-username>/my-first-blog.git
$ git push -u origin master

The current directory for that is ~/djangogirls, which may already contain many files and directories which shouldn't be pushed. Even though .gitignore takes care of myvenv, there my be others, especially by those participants who love experimenting and creating .py files.

My recommended solution: Create the Django project in the ~/djangogirls/my-first-blogsubdirectory.

ekohl commented 7 years ago

Another issue is that many students place their virtualenv with a different name, leading to including the venv in git. It'll work, but leads to bigger git push/pull. A subdirectory might work but do realise that the concept of files and directories is already a difficult one (see #1042).

pts commented 7 years ago

the concept of files and directories is already a difficult one

I think students have a good understanding of files. They also have some understanding of directories, e.g. they know that Documents and Downloads are different directories. I think creating a subdirectory here would be just a minor complexity for them.

ekohl commented 7 years ago

That highly depends on your students. Some have no problems at all, but others needs some explanation.

pts commented 7 years ago

To clarify my recommended solution: Create the Django project in the ~/djangogirls/my-first-blog subdirectory. modify the tutorial accordingly (probably at multiple locations), and add some explanation to the tutorial.

As a side effect, the myvenv can be removed from .gitignore, but it's probably safer to keep it there.

aniav commented 7 years ago

@pts feel free to create a pull request with these changes :)