These are the steps employed in Django projects created by software developer Rathan Kumar.
1. Create your project in an IDE terminal like VS Code.
2. Open your GitHub account and create a new repository. Example: Repository name: Django-blog. Set it private until you are done with the project.
Use each lines below and execute them into your VS code terminal. We replace GIT ADD README.MD with GIT ADD -A to push all files.
echo "# Django-blog" >> README.md
git init
git add -A
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/RosyCodes/Django-blog.git
git push -u origin main
3. Use GIT STATUS if you need to see what files have made some changes.
4. Then issue the following to push some changes.
git add -A
git commit -m "Your unique comment for the major functionality you have made"
git push -u origin main
5. You need to reload your GitHub account to see the changes
6. In case you have made some changes in your online repository but not in your local / laptop repository, this will arise in changes, to make the changes update in your local repository. do this:
git push -u origin main
7. After you have 'pulled' the changes from your online repository, issue the codes to push the changes in files to your online.
git add -A
git commit -m "Your unique comment for the major functionality you have made"
git push -u origin main
8. When you need to deploy, we make sure that we add all the files and folders of our project EXCEPT:
. ENV (DOTENV) - this file holds the sensitive data
.VENV - your virtual environment
MEDIA
DBSQLITE3
*** However, you need the MEDIA AND DB in GITHUB, but these will be done by using PYTHON MANAGE.PY COLLECTSTATIC. View the BLOG PROJECT as a guide.
Link to Blog Project Deployment here:
https://digitalnotebooks.co/accounts/shared/e4b59841-7fde-4c71-aff4-39aadefa7dd9/
9. During deployment, we issue the command
git clone <Github project link>
No PDF file attached.