개발환경
파이썬 가상환경이란?
where python #mac에서는 which python
python --version
pip list
왜 가상환경을 써야 할까?
패키지 간의 충돌이 일어나지 않도록 독립적인 개발환경을 만들어주어야 하기 때문
콘다 가상환경이란?
conda: anaconda에 포함된 도구 중 패키지와 가상환경을 관리할 수 있게 하는 도구
conda --version conda env list conda deactivate #중첩 실행되지 않도록 가상환경을 해제해줄 것
conda create --name 'name' python=3.8 conda env remove --name 'name'
작업의 흐름
fork
아직은 github의 원격 공간(remote repository) 안에 있음.
git clone
fork한 원격 레포지토리를 clone, pull, fetch으로 로컬 작업 환경에 가져올 수 있음
clone → add(stage area에 옮김: staging) → commit(local repository에 업로드) → push(remote repository에 업로드) → pull(원본 repo에 작업내용을 반영)
git clone #pull, fetch와 동일: 로컬 작업환경에 가져온다 git add . #(. = all) staging: stage area에 적재한다 git commit -m 'commit message' #local repository에 업로드한다 git push #remote repository에 업로드한다 git pull #git fetch와 git merge를 순서대로 실행한 것으로, 원본 repository에 작업 내용을 반영한다
※git에서 제공하는 기능과 github에서 제공하는 기능을 분리해서 생각할 수 있어야 함
repo를 잘못 가져왔을 때는 어떻게 할까
ls -al rm -rf .git #git 폴더 삭제
자주 쓰이는 git 명령어 모음
로컬 환경에서 주로 쓰는 명령어
git init #현재 폴더를 git으로 관리할 수 있게 초기화 git status #에러가 발생했을 때 상태를 확인할 수 있음 git log git commit git add git branch git checkout
온라인으로 작업할 때 주로 쓰는 명령어
git remote add 'name' url #name은 별칭으로, 없어도 괜찮다 git fetch url branch git merge branch_name git push git pull
Uploaded by Notion2Tistory v1.1.0