-
Git / github pull 덮어쓰기Web dev/Git&Github 2022. 5. 6. 12:38728x90반응형
EC2 자동배포에 시도했다가 실패해서 급한대로 pull을 했다..
1. git pull 덮어쓰기
git fetch --all git reset --hard origin/master
2. master가 아닌 branch로 덮어 쓰기
git fetch --all git reset --hard origin/<branch_name> // branch로 작업중이였다면 브랜치이름으로 작성
3. 현재 로컬 커밋을 유지하려면 다른 브랜치를 만들어 pull 해주기
git checkout master git branch <branch name> git fetch --all git reset --hard origin/master
728x90반응형'Web dev > Git&Github' 카테고리의 다른 글
Git / 원경 저장소 확인, 연결 끊기 (git remote) (0) 2022.05.06 GitHub / React gh-pages gitgub 배포 빌드 후 빈화면 / ConnectRouter baseURL history 설정방법 (0) 2022.04.11 GitHub / React gh-pages 배포 빌드 후 빈화면 / BrowserRouter 라우팅 문제해결 (0) 2022.04.11 GitHub / React 배포 / gh-pages 사용하기 (0) 2022.04.11 Github / github 배포하기 / 레포지터리 생성 (0) 2022.04.11