{"id":16141120,"url":"https://github.com/hustle-dev/yalco-git","last_synced_at":"2026-01-20T20:12:24.289Z","repository":{"id":151986683,"uuid":"505025416","full_name":"hustle-dev/yalco-git","owner":"hustle-dev","description":"인프런의 제대로 파는 Git \u0026 Github - by 얄코를 보고 학습하는 레포지토리입니다.","archived":false,"fork":false,"pushed_at":"2022-06-19T16:29:31.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T18:44:46.634Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hustle-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-19T06:00:56.000Z","updated_at":"2022-09-17T12:48:47.000Z","dependencies_parsed_at":"2023-07-22T05:28:14.724Z","dependency_job_id":null,"html_url":"https://github.com/hustle-dev/yalco-git","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hustle-dev/yalco-git","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustle-dev%2Fyalco-git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustle-dev%2Fyalco-git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustle-dev%2Fyalco-git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustle-dev%2Fyalco-git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hustle-dev","download_url":"https://codeload.github.com/hustle-dev/yalco-git/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustle-dev%2Fyalco-git/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28612166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T23:54:34.459Z","updated_at":"2026-01-20T20:12:24.283Z","avatar_url":"https://github.com/hustle-dev.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# yalco-git\n\n인프런의 [제대로 파는 Git \u0026amp; Github - by 얄코](https://www.inflearn.com/course/%EC%A0%9C%EB%8C%80%EB%A1%9C-%ED%8C%8C%EB%8A%94-%EA%B9%83/dashboard)를 보고 학습하는 레포지토리입니다.\n\n![](https://cdn.inflearn.com/public/files/pages/bb66ff7b-0d11-4735-8ac8-8a6360bd5b94/%EA%B0%95%EC%9D%98%201.png)\n\n## Git 시작하기\n\n### Git을 배워야 하는 이유\n\n프로젝트의 **시간**과 **차원**을 관리\n\n- 시간: 프로젝트의 버전을 과거로 되돌리거나 특정 내역 취소 가능\n\n- 차원: 프로젝트의 여러 모드를 쉽게 전환하고 관리\n\n### 강의를 위한 설치와 세팅(맥)\n\n1. Git 설치\n\n```bash\nbrew install git\n```\n\n2. SourceTree 설치\n\nhttps://www.sourcetreeapp.com/\n\n3. vscode 설치\n\nhttps://code.visualstudio.com/\n\n4. iterm2 설치\n\nhttps://www.yalco.kr/_03_mac_terminal/\n\n협업시 윈도우와 맥에서 엔터 방식 차이로 인한 오류 방지를 위해 아래 명령어 입력\n\n```bash\ngit config --global core.autocrlf input\n```\n\n### CLI vs GUI. 무엇을 사용해야 할까요?\n\n얄코의 경우\n\n- git에서 뭔가를 실행하기 위한 어떤 명령들을 사용하는 경우 -\u003e CLI\n\n- 프로젝트의 상태를 Git상에서 자세히 살펴보아야 할 때는 -\u003e GUI(소스트리 사용)\n\n\u003e 공부할때는 CLI로 학습하는것이 좋다.\n\n### Git 설정 \u0026 프로젝트 관리 시작하기\n\n1. Git 최초 설정\n\nGit 전역으로 사용자 이름과 이메일 주소를 설정\n\n```bash\ngit config --global user.name \"(본인 이름)\"\n```\n\n```bash\ngit config --global user.email \"(본인 이메일)\"\n```\n\n**기본 브랜치명 변경**\n\n```bash\ngit config --global init.defaultBranch main\n```\n\n\u003e main으로 브랜치명을 변경하자.\n\n2. 프로젝트 생성 \u0026 Git 관리 시작\n\n원하는 폴더에서 아래의 명령어 입력\n\n```bash\ngit init\n```\n\n\u003e 그러나 나는 이미 github에 레포를 만들었기 때문에 git clone으로 자동으로 생성\n\n파일 생성후 아래의 명령어를 입력하면 현재 상태 확인 가능\n\n```bash\ngit status\n```\n\n3. 소스트리로 해보기\n\n소스트리에서 git init 명령어를 gui로 할 수 있는데 그냥 명령어로 치는게 빠름\n\n소스트리에서 GUI로 현재 상태가 어떤지 확인할 수 있음\n\n### Git에게 맡기지 않을 것들\n\n- 포함할 필요가 없을 때\n\n  - 자동으로 생성 또는 다운로드되는 파일들 (빌드 결과물, 라이브러리)\n\n- 포함하지 말아야 할 때\n  - 보안상 민감한 정보를 담은 파일\n\n**.gitignore 사용**\n\n파일 생성 후, `secrets.yaml ` 입력\n\n## 시간 여행하기\n\n### 변화를 타임캡슐에 담아 묻기\n\n1. 프로젝트의 변경 사항들을 타임 캡슐(버전)에 담기\n\n변경사항 확인\n\n```bash\ngit status\n```\n\n\u003e 추적하지 않는(untracked) 파일: Git의 관리에 들어간 적 없는 파일\n\n파일 하나 담기\n\n```bash\ngit add tigers.yaml\n```\n\n모든 파일 담기\n\n```bash\ngit add .\n```\n\n2. 타임캡슐 묻기\n\n```bash\ngit commit\n```\n\n3. 다음 변경사항들을 만들고 타임캡슐 묻기\n\n파일 삭제및 변경 추가 한 후, `git status`와 `git diff`로 확인해볼 수 있다.\n\nadd와 commit을 한번에 할 수 있다.\n\n```bash\ngit commit -am \"(메시지)\"\n```\n\n\u003e 📍 단 새로 추가된(untracked) 파일이 없을 때 한정\n\n이후 실습 진행\n\n### 과거로 돌아가는 두 가지 방법\n\n- reset: 원하는 시점으로 돌아간 뒤 이후 내역들을 지운다.\n\n\u003e 즉, 히스토리를 지우게 됨\n\n- revert: 되돌리기 원하는 시점의 커밋을 거꾸로 실행한다.\n\n\u003e 히스토리를 하나하나 남길 필요가 있을 때, 이 방식을 사용!\n\n### 과거로 돌아가기 실습\n\nreset, revert 실습진행\n\n```bash\ngit reset --hard\n```\n\n\u003e 이를 사용하면 현재 작업 위치인 HEAD의 포인터를 특정 위치로 변경할 수 있다.\n\n\u003e 즉 워킹 디렉토리까지 업데이트 한다는 의미\n\n## 차원 넘나들기\n\n### 여러 branch 만들어보기\n\nbranch: 분기된 가지(다른 차원)\n\n사용 이유\n\n- 프로젝트를 여러개로 관리해야할 때\n\n  - 예) 배포용, 테스트용, 새로운 기능 추가용\n\n- 여러 작업들이 각각 독립되어 진행될 때\n\n  - 예) 신기능1, 신기능2, 코드개선, 긴급수정..\n  - 각각의 차원에서 작업한 뒤 확정된 것을 메인 차원에 통합\n\n`add-coach`란 브랜치 생성\n\n```bash\ngit branch add-coach\n```\n\n브랜치 목록 확인\n\n```bash\ngit branch\n```\n\n`add-coach` 브랜치로 이동\n\n```bash\ngit switch add-coach\n```\n\n브랜치 생성과 동시 이동\n\n```bash\ngit switch -c new-teams\n```\n\n브랜치 삭제\n\n```bash\ngit branch -d (삭제할 브랜치명)\n```\n\n다른 브랜치로 가져오지 않은 내용이 있는 브랜치를 지우는 경우 `-D` 사용\n\n```bash\ngit branch -D (강제삭제할 브랜치명)\n```\n\nCLI에서 여러 브랜치의 내역 편리하게 보는 방법\n\n```bash\ngit log --all --decorate --oneline --graph\n```\n\n\u003e 근데 GUI환경인 소스트리가 있으므로 이런것을 확인하고 싶을때는 그냥 gui켜서 확인하는 것이 좋다.\n\n### branch를 합치는 두 가지 방법\n\n- merge: 두 브랜치를 한 커밋에 이어붙인다.\n\n\u003e 즉, 새로운 커밋이 생기는것\n\n- rebase: 브랜치를 다른 브랜치에 이어붙인다.\n\n\u003e 현재 작업중인 브랜치를 다른 브랜치에 하나 하나 커밋한 것처럼 추가한다.\n\nmerge는 브랜치 히스토리가 남지만, rebase는 브랜치 히스토리가 남지 않는다.\n\n\u003e 팀원들과 협업하는 경우 rebase를 사용하지 않는것이 좋다고함.\n\n### branch 합치기 실습\n\n### 충돌 해결하기\n\nmerge와 rebase를 활용하여 실습진행\n\n## GitHub 사용하기\n\n### push와 pull\n\npush 할 것이 있을 시 pull 하는 두 가지 방법\n\n- `git pull --no-rebase` -\u003e merge 방식\n\n- `git pull --rebase` -\u003e rebase 방식\n  \u003e 협업시 사용 OK(보통 협업할 때는 브런치를 만들어서 작업하기에 rebase를 잘 사용하지 않음. 그러나 단순히 push하기 전 rebase는 ㄱㅊ)\n\n원격 저장소에 문제가 생겨서 로컬의 것으로 강제 push를 하기 위해선 아래의 명령어를 사용할 수 있음\n\n```bash\ngit push --force\n```\n\n### 원격의 브랜치 다루기\n\n로컬에서 `from-local` 이라는 브랜치를 만들고, 원격에 다음의 명령어로 브랜치를 생성할 수 있다.\n\n```bash\ngit push -u origin from-local\n```\n\n브랜치 목록을 살펴보는 방법으로 아래의 명령어를 사용할 수 있다.\n\n```bash\ngit branch --all\n```\n\n**원격의 브랜치 로컬에 받아오기**\n\ngithub에서 `from-remote` 브랜치 만들기\n\n이후 아래 명령어로 변경사항 확인\n\n```bash\ngit fetch\n```\n\n아래 명령어로 로컬에 같은 이름의 브랜치를 생성하여 연결하고 switch\n\n```bash\ngit switch -t origin/from-remote\n```\n\n**원격의 브랜치 삭제**\n\n```bash\ngit push (원격 이름) --delete (원격의 브랜치명)\n```\n\n## Git 보다 깊이 알기\n\n## 프로답게 커밋 관리하기\n\n## 취소와 되돌리기 보다 깊이 알기\n\n## 태그\n\n## Branch 보다 깊이 알기\n\n## 분석하고 디버깅 하기\n\n## Git의 추가 기능들\n\n## GitHub 잘 활용하기\n\n## GitHub 제대로 활용하기\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustle-dev%2Fyalco-git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhustle-dev%2Fyalco-git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustle-dev%2Fyalco-git/lists"}