플라스크 로컬 서버와 공개 서버간 db충돌 질문입니다.
지금까지 gunicorn과 nginx를 이용해서 공개서버를 호스팅하는 것 까지 완료했습니다.
로컬서버에서 글을 쓰면 공개서버에서는 어떻게 될까 궁금해서 글을 하나 썼는데 공개서버에서 pull하는 과정에서 충돌이 일어나는 것 같습니다. 잘 모르고 건들면 큰일 날 것 같아서 여쭤봅니다..
아래가 터미널에서 git pull과 git status를 했을 때입니다.
(myproject) ubuntu@ip-172-26-11-211:~/projects/myproject$ git pull
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 9 (delta 7), reused 9 (delta 7), pack-reused 0
Unpacking objects: 100% (9/9), 1.61 KiB | 274.00 KiB/s, done.
From https://github.com/HyeonjunOh/pybo
a6af4cb..b738f22 master -> origin/master
Updating a6af4cb..b738f22
error: Your local changes to the following files would be overwritten by merge:
pybo.db
Please commit your changes or stash them before you merge.
Aborting
(myproject) ubuntu@ip-172-26-11-211:~/projects/myproject$ git status
On branch master
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: pybo.db
Untracked files:
(use "git add <file>..." to include in what will be committed)
config/__pycache__/__init__.cpython-38.pyc
config/__pycache__/default.cpython-38.pyc
migrations/__pycache__/env.cpython-38.pyc
migrations/versions/__pycache__/1b3f4eb3bcdc_.cpython-38.pyc
migrations/versions/__pycache__/1e92d2819996_.cpython-38.pyc
migrations/versions/__pycache__/2ead465a52a2_.cpython-38.pyc
migrations/versions/__pycache__/2f9325ca64fb_.cpython-38.pyc
migrations/versions/__pycache__/490e536d1b5f_.cpython-38.pyc
migrations/versions/__pycache__/59e5086950f5_.cpython-38.pyc
migrations/versions/__pycache__/5d5e6889d0a5_.cpython-38.pyc
migrations/versions/__pycache__/6e57f80adb71_.cpython-38.pyc
migrations/versions/__pycache__/76b90d412663_.cpython-38.pyc
migrations/versions/__pycache__/7dfda449e8b7_.cpython-38.pyc
migrations/versions/__pycache__/801f714532c9_.cpython-38.pyc
migrations/versions/__pycache__/9edd91922192_.cpython-38.pyc
migrations/versions/__pycache__/b450b3528c75_.cpython-38.pyc
migrations/versions/__pycache__/c361d0e742e4_.cpython-38.pyc
migrations/versions/__pycache__/e9ffa07ce2e0_.cpython-38.pyc
pybo/__pycache__/__init__.cpython-38.pyc
pybo/__pycache__/filter.cpython-38.pyc
pybo/__pycache__/forms.cpython-38.pyc
pybo/__pycache__/models.cpython-38.pyc
pybo/views/__pycache__/answer_views.cpython-38.pyc
pybo/views/__pycache__/auth_views.cpython-38.pyc
pybo/views/__pycache__/comment_views.cpython-38.pyc
pybo/views/__pycache__/main_views.cpython-38.pyc
pybo/views/__pycache__/question_views.cpython-38.pyc
pybo/views/__pycache__/vote_views.cpython-38.pyc
no changes added to commit (use "git add" and/or "git commit -a")
오현준 님 768
2020년 10월 21일 4:30 오후
1개의 답변이 있습니다. 1 / 1 Page
안녕하세요.
지금 pybo.db 파일이 것허브 저장소에 올라가 있는거 같습니다.
.gitignore 파일에 *.pyc
와 pybo.db
를 추가하셔서 버전관리하면 안되는 파일을 관리해 주셔야 합니다.
다음 페이지를 참조하셔서 .gitignore 파일을 작성해 주세요.
박응용 님
2020년 10월 21일 8:30 오후