본문 바로가기

Study_note(zb_data)/Git

(6)
스터디 노트 (Git tag) 📌 Git Tag 🧷 tag 목록 git tag 🧷 tag 달기 git tag tag_name 🧷 특정 commit에 태그 달기 git tag tag_name commit_name 🧷 git tag remote 환경으로 내보내기 git push origin tag_name 🧷 특정 tag의 상세 정보 git show tag_name 🧷 Tag 삭제 (local) git tag --delete tag_name 🧷 Tag 삭제 (Remote) git push --delete origin tag_name
스터디 노트 (Git merge) 📌 Git merge 사전 설정 - git configuration file open git config --global -e - git merge 설정 옵션 추가 [merge] tool = vscode [mergetool] cmd = "code --wait $MERGED" 📌 Git merge - 현재 위치한 Branch에 다른 Branch를 병합 git merge branch_name2 📌 Git merge conflict 🧷 merge 중 conflict (충돌을 만났을 때) - git mergetool 을 실행시켜 데이터를 정리한 후, commit 진행 git mergetool
스터디 노트 (Git log, diff) 📌 Git editor 설정 - --wait 옵션은 editor를 실행시켰을 경우, 인스턴스를 닫을 때 까지 bash 환경은 대기하게 된다 git config --global core.editor editor_name --wait 📌 Git Diff 설정 - git configuration file open git config --global -e - git diff 설정 추가 tool = vscode cmd = "code --wait --diff $local $remote 📌 Git Diff 🧷 Local 환경 branch 간 비교 git diff branch1 branch2 🧷 Local 환경 branch 간 비교 (Tool 사용) gi diffool branch1 branch2 🧷 commit 간 ..
스터디 노트 (Git_Branch 관리하기) 📌 Branch 조회하기 🧷 Local branch 조회 git branch 🧷 Remote Branch 조회 git branch -r 🧷 전체 Branch 조회 git branch -a 📌 Branch 생성하기 (Local 환경) git branch branch_name 📌 Branch 이동 git checkout branch_name 📌 Branch 생성 + 이동 - Branch 생성 + 이동 - 기존에 생성되어 있다면 에러 발생 git checkout -b branch_name 📌 Branch (Remote 환경에 최신화 하기) git push origin branch_name 📌 Branch 삭제 - Local 환경 git branch -d branch_name - Remote 환경 git pus..
스터디 노트 (Git_remote repository 생성, 복제) 📌 Remote Repository 생성 🧷 Readme file - 프로젝트에 대한 설명, 사용 방법, 라이센스, 설치 방법에 대한 내용을 기술 - 나, 직장 동료, 프로그램 사용자들의 편의를 위해 존재 🧷 .gitignore - git버전 관리에서 제외할 파일 목록을 지정하는 파일 - 사용자가 원하지 않는 파일들을 자동으로 commit 대상에서 제외한다. 📌 Branch_name 수정 - View all branch 클릭 - 연필 모양 클릭 후 수정 가능 ※ 참고 - Setting - Repositories 에서 default 값으로 되어 있는 branch_name을 수정할 수 있다 📌 Remote Repository 복제하기 - local repository를 생성하지 않은 상태에서 git clon..
스터디 노트 (about Git) 📌 Git 설정 명령어 git config --global user.name git_name git config --global user.email git_email 📌 CRLF - 윈도우 사용자들을 위해서 줄바꿈 형식을 자동으로 바꿔준다 - 가져올땐 LF를 CRLF로, 보낼때는 CRLF를 LF로 변경 gi config --global core.autocrlf true 📌 전체 설정 확인 git config --list 📌 항목별 설정확인 git config 📌 Repository - git status 명령어 습관을 생활화 하자! 🧷 Git을 관리할 디렉토리 생성 mkdir folder_name 🧷 해당 폴더로 이동 후, Git init git init 🧷 git add git add (file_nam..