본문 바로가기

commit4

[GitHub] Repository에 'main' branch로 push 하기 ✍️ Summary// 로컬 깃 저장소 생성(.git 폴더 생성)git init// Working directory -> Staging Areagit add .// Staging Area -> repository(.git)git commit -m "commit message"// 원격저장소와 연결git remote add origin [원격저장소 주소]// 브랜치 명 바꾸기 (택1)git branch -M [branch name(main)]git branch -m [현재 branch name] [바꾸고싶은 branch name]// (선택) README.md가 있다면 : push 보다 pull 먼저git pull origin [branch name(main)]// 로컬 레포지토리 → 원격 레포지토리git.. 2024. 5. 28.
[GitHub] 이전 커밋(commit) 삭제 : reset 사용 (커밋 롤백) github에 push된 commit 삭제하는 법1. git log를 통해 삭제할 commit 찾기2. git reset을 통해 commit 삭제하기최근의 commit을 삭제하고 싶을 땐 git reset HEAD^최근의 n개의 commi을 삭제하고싶을땐 git reset HEAD~n3. git push -f origin "branch name"을 통해 github에 commit 삭제를 알리기git loggit reset HEAD^git push -f origin "master"이 3번째 단계를 해주면 github에서도 commit 삭제가 반영된다. 2024. 5. 25.
[GitHub] 깃배쉬(Git Bash)로 깃허브에 코드 올리기 & 코드 업데이트하기 (깃허브 잔디심기) Git Downloadhttps://www.git-scm.com/download Git - DownloadsDownloads macOS Windows Linux/Unix Older releases are available and the Git source repository is on GitHub. GUI Clients Git comes with built-in GUI tools (git-gui, gitk), but there are several third-party tools for users looking for a platform-specific expwww.git-scm.com✍️ Summary// 저장소 생성 및 연결git initgit remote add origin [원격저장소 주소]git.. 2024. 5. 13.
[Git] 커밋 컨벤션 1. Commit 메시지 구조기본 적인 커밋 메시지 구조는 제목,본문,꼬리말 세가지 파트로 나누고, 각 파트는 빈줄을 두어 구분한다.type : subjectbody footer2. Commit Type타입은 태그와 제목으로 구성되고, 태그는 영어로 쓰되 첫 문자는 대문자로 한다.태그 : 제목의 형태이며, : 뒤에만 space가 있음에 유의한다.feat : 새로운 기능 추가fix : 버그 수정docs : 문서 수정style : 코드 포맷팅, 세미콜론 누락, 코드 변경이 없는 경우refactor : 코드 리펙토링test : 테스트 코드, 리펙토링 테스트 코드 추가chore : 빌드 업무 수정, 패키지 매니저 수정3. Subject제목은 최대 50글자가 넘지 않도록 하고 마침표 및 특수기호는 사용하지 않는다.. 2023. 5. 1.
728x90
반응형