tutorial icon indicating copy to clipboard operation
tutorial copied to clipboard

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

Open pts opened this issue 8 years ago • 5 comments

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.

pts avatar May 10 '17 15:05 pts

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).

ekohl avatar May 20 '17 13:05 ekohl

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.

pts avatar May 20 '17 13:05 pts

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

ekohl avatar May 20 '17 13:05 ekohl

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.

pts avatar May 20 '17 13:05 pts

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

aniav avatar Sep 17 '17 16:09 aniav