-
디렉토리 변경할때마다 git 초기화 필요CS/git 2022. 7. 7. 12:58
여태까지는 디렉토리마다 git 있는 경우도 있어 난잡해졌다..새로운 repo에 연결하거나, 디렉토리 변경할때 깔끔하게 git 초기화하는게 좋을 듯하다
1. git 삭제
$ rm -rf .git $ git remote -v fatal: Not a git repository (or any of the parent directories): .git $ git init -- 저장소 생성...(여태까지 git 초기화인줄;;;) Initialized empty Git repository in {~}/.git/ $ vim .gitignore
2. .gitignore 파일
#data *.csv *.ftr *.xlsx *.xls #img .jpg .png .jpeg ~
3. git add 및 commit
4. git log로 커밋내역 확인
5. git remote add
6. git push
7. 1.git 삭제
Reference
'CS > git' 카테고리의 다른 글
git pull remote branch (0) 2023.04.17 git clone 특정 branch (0) 2022.12.18 M1 chip github 설치 (0) 2022.12.18 [jenkins] git API key로 crendential 추가 (0) 2022.07.05 Git 새로운 remote repository 추가 (0) 2022.06.27