- 초기화
git init
- 파일 추가하기
git add .특정 파일을 추가하고 싶다면 .이 아닌 파일명을 적어준다
#) 상태확인
git status
- 히스토리 작성
git commit -m "num commit"" "안에 원하는 히스토리 작성
- github repository와 내 로컬 프로젝트 연결
git remote add origin http:~http는 github repositoty http를 작성
#) 연결확인
git remote -v연결한 주소값이 뜨면된다
- Github 올리기
git push origin mastermaster branch가 아닌 다른 곳에 올리고 싶을 경우 branch이름을 달리한다.
- 파일 추가하기
git add .특정 파일을 추가하고 싶다면 .이 아닌 파일명을 적어준다
- 히스토리 작성
git commit -m "your commit"" "안에 원하는 히스토리 작성
- Github 올리기
git push origin mastermaster branch가 아닌 다른 곳에 올리고 싶을 경우 branch이름을 달리한다.
- Github에서 소스코드 다운로드
git clone 주소 폴더이름주소는 github에서 가져온다
폴더이름은 선택사항이다
- Github에 내 branch 만들기
git checkout -b 브렌치이름
- branch에 소스코드 업데이트하기
git add . git commit -m "num commit" git push origin 브렌치이름
- master branch 가져오기
git pull origin master
#) branch 이동하는 법
git checkout 브렌치이름