I want to git management of django project

Asked 2 years ago, Updated 2 years ago, 68 views

I would like to manage the django project with git. Is the following location okay?

mysite/
    .git
    manage.py
    mysite/
        __init__.py
        settings.py
        urls.py
        wsgi.py

Also, in django, what should I register with .gitignore?

python git django

2022-09-29 22:05

1 Answers

git management for django projects

This is the correct placement for managing the project alone.

In addition to the django project, mysite in this case, there are many other files that you would like to add, but you can always put them at the top of the directory you want to manage.
I will manage everything below .git.

django Project Basics .gitignore

You can download the .gitignore template for git management on a specified service from a service called gitignore.io.

Below is the django template

#Created by https://www.gitignore.io/api/linux,django

### Django###
*.log
*.pot
*.pyc
__pycache__/
local_settings.py
db.sqlite3
media

# If your build process includes running collectstatic, then...


2022-09-29 22:05

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.