티스토리 뷰
1. orphan branch를 생성
2. master branch를 삭제
3. orphan branch를 master branch로 이름 변경
아래 명령어를 차례대로 입력하면 됨.
git commit -m "message"
git checkout --orphan new-branch
git add --all
git commit -m "Initial Commit"
git branch -D master
git branch -m master
git push -f origin master
출처: https://medium.com/@debshish.pal/delete-entire-commit-history-of-a-git-repository-86e25602e4ef
'Git' 카테고리의 다른 글
[GIT] vscode에서 브런치 정리하기 (0) | 2022.09.28 |
---|---|
[GIT] git pull, push 할때 비밀번호 입력하지 않기 (0) | 2021.12.07 |
[git] git 로컬 user.name 설정 (0) | 2020.08.28 |
git 로컬파일은 냅두고 원격파일만 삭제하기 (0) | 2019.06.27 |