Setting Git & Virtualenv

Put Local folder into git repo

  • Make folder ‘example’ and git repo ‘example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#in local cmd example folder
git init

#add remote repo
git remote add origin 'repo https'

#bring files in repo to local
git pull origin master

#bring local files to git repo
git add .
git commit -m 'updated'
git push orgin master

#check remote
git remote -v

#check current status
git status

#error: failed to push some refs to 'https://github.com/jmj3047/.git'
#force to push
git push -f origin master

Setting virtual env in window/linux

1
2
3
4
5
6
7
#****use virtual env no matter what****
>python -m venv env_name
>source env_name/Scripts/activate #window
>source env_name/bin/activate #linux

#put all the version of modules in requirements.txt
>pip install -r requirements.txt
Share