[DevHyun's Blog] Pythonanywhere 에서 Git Project Pull 한 후 재배포 하기
장고걸스 코치들과 자원봉사자들의 수고로 번역된 글을 참고하였습니다.
Blog App에서 수정사항이 있을경우 Pycharm에서 Commit-Push 한 후에 Pythonanywhere에서 pull 해줘야 동기화 가능!
1. pythonanywhere -> consoles
Host, run, and code Python in the cloud: PythonAnywhere
Batteries included With Python versions 2.7, 3.3, 3.4, 3.5 and 3.6, and all the goodies you normally find in a Python installation, PythonAnywhere is also preconfigured with loads of useful libraries, like NumPy, SciPy, Mechanize, BeautifulSoup, pycrypto,
www.pythonanywhere.com
2. Blog Project 폴더로 변경
* Blog Project 명
cd DevhyunDjangoBlog |
3. Pull 하기
git pull |
4. 완료
* pythonanywhere -> web -> reload!
5. case 1) pull 할때 에러 발생
* pull 할때 충돌되는 파일이 있어서 merge error 발생
... .. . error: Your local changes to the following files would be overwritten by merge ... .. . |
6. git stash
*stash : unstaged 파일들을 임시 저장하고 HEAD의 상태로 백업을 하는 것
git stash git stash list - stash 한 list 호출 git stash pop - stash 내역 보여주기 |
7. 완료
*pythonanywhere -> web -> reload!
8. case 2) fatal error 발생
* 작업자가 누군지 정하지 않았을 때 발생
*** Please tell me who you are. ... .. . fatal: empty ident name (for <devhyun@8e86bfb0e784>) not allowed Cannot save the current index state |
9. email 및 이름 입력
git config --global user.email "you@example.com" git config --global user.name "Your Name" |
10. git stash
git stash git stash list - stash 한 list 호출 git stash pop - stash 내역 보여주기 |
11. pythonanywhere -> web -> reload!
12. 절대 경로 바꾸기(주석처리 된것 활성화)
- settings.py
- view.py