git reset --soft HEAD~1
git config --global user.name "dongsu"
git config --global user.eamil “dongsu0717@nate.com"
git config --list (확인)
git init
git add .
git commit -m “내용"
git remote add origin 레포주소(remote - v 연결고리 확인)
git push origin master (맨처음에 강제로 master에다가)
(폴더 위치 정하고)
git clone 주소 폴더이름 (폴더이름 안써주면 자동으로 프로젝트 이름의 폴더로 들어감)
git add .
git commit -m "코멘트"
git checkout -b dongsu
git push origin dongsu
master 뭔가 바뀌면 모든사람 pull부터 하고 개발하자, 내꺼 저장하고 pull하기
git add .
git commit -m "코멘트"
git pull origin master (master브랜치로부터 새로운 코드를 받아온다)
git push origin dongsu (그리고 합쳐진 코드 올리기)
git branch 이름 (브랜치 생성)
git checkout 이름 (브랜치 이동)git
git checkout -b 이름 (생성후 이동)
git branch (브랜치 리스트)
git branch -r (원격브랜치 목록 확인 - 프로젝트 clone해서 처음에 확인해보자)
git checkout 브랜치이름 (원하는 브랜치로 바꾸기)
git fetch —all (모든 원격 브랜치 로컬로 가져오기)
1.브랜치 업데이트
git branch update
2.브랜치 제거후 재연결
gir remote -v 연결된거확인
git remote remove 연결된 원격 저장소(main, master 등)
git remote add 원격주소 (재연결)
mirror push해야함
git clone --bare 포크뜬 레포지토리cd로git push --mirror 새로운 레파지토리다시 clone하고 git checkout dongsu 로 원래 있던 브랜치로 이동하면 됨
git clone —mirror (협업 프로젝트주소) : 복사하기
cd (협업프로젝트) : 이동하는거임
git remote set-url —push origin (내 레포주소)
git push —mirror