티스토리 뷰

Git

[git] 원격 first commit 지우기

skydev 2020. 8. 14. 14:39

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

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
글 보관함