기본명령어 - checkout>> git checkout - file add>> git add * >> git add test.java // 특정파일만 등록할 때 - commit>> git commit -m "commit message" - push>> git push origin master
github에 새로운 프로젝트를 푸시하기 위해서 아래와 같이 pull 명령어를 실행했더니 에러가 표시되었다. >> git pull origin master-- fatal: refusing to merge unrelated histories 이럴 경우 아래와 같이 옵션을 주어 pull 받도록 하자 git pull origin branchname --allow-unrelated-histories 이렇게 에러가 떨어지는 이유는 아래와 같다고 한다..... (시간날떄 해석을....) "git merge" used to allow merging two branches that have no common base by default, which led to a brand new history of an existi..
- .gitignore 란? git version 관리에서 제외할 파일을 설정할 수 있다. 일반적으로 컴파일된 소스에 경우 버전관리 하지 않는다. - 작성방법 1234filename -- filename 제외filename* -- filename으로 시작하는 파일 제외*filename -- filename로 끝나는 파일 제외folder/ -- folder cs - 적용이 안될 때 .gitignore에 작성한 내용이 필터가 안될 경우 cmd 창에서 아래와 같이 명령어를 실행한다. 12>> git rm -r --cached .>> git add . cs