Version Control

git first commit remove

out of coding 2018. 3. 24. 15:33

git을 사용하다가 엉뚱한 repository에 소스를 올리는 경우가 발생하게 되는데요

이러한 경우에 다음 명령어를 사용하면 됩니다.


git branch -D와 rm -rf .git 은 사용하지 않는게 나은것 같고...


1
$ git update-ref -d HEAD
cs


이걸 사용하도록 합시다.


https://stackoverflow.com/questions/6632191/how-to-revert-initial-git-commit


여기에서 참조했음.