Git(14)
-
remote repository를 local host pc에 add하는 방법
현재 remote repository가 empty history 상태일 경우,두 가지 방법의 local host pc에 add하는 방법이 있음. 1. …or create a new repository on the command lineecho "# hello" >> README.mdgit initgit add README.mdgit commit -m "first commit"git branch -M maingit remote add origin https://github.com/intheeast/hello.gitgit push -u origin main 2. …or push an existing repository from the command linegit remote add origin https:/..
2025.05.08 -
GitBash Credentials 수정
$ git push -u origin mainremote: Permission to nomadinsunda/inferencelocalhost.git denied to intheeast.fatal: unable to access 'https://github.com/nomadinsunda/inferencelocalhost.git/': The requested URL returned error: 403 이 오류는 현재 intheeast GitHub 계정으로 접근 권한이 없어서 발생하는 것입니다. nomadinsunda 계정으로 변경하려면 다음 단계들을 따라 설정을 변경할 수 있습니다. 1. 현재 Git 사용자 정보 확인먼저, 현재 사용 중인 Git 사용자 정보를 확인하려면 Git Bash에서 다음 명령어를 입..
2024.11.14 -
git log --oneline --decorate --graph --all
git log --oneline --decorate --graph --all 명령어에서--decorate 옵션은 각 커밋에 연결된 참조(ref) ― 즉 브랜치명, 태그명, HEAD 등을커밋 메시지 옆에 표시해주는 역할을 합니다. 🔍 --decorate 옵션 설명커밋 메시지 옆에 현재 이 커밋을 가리키는 포인터 목록을 출력합니다.예를 들어 브랜치 main과 HEAD가 같은 커밋을 가리키고 있다면 다음처럼 표시됩니다:* 1a2b3c4 (HEAD -> main) Initial commit여기서:HEAD -> main은 현재 브랜치(main)가 HEAD에 연결되어 있음을 뜻함만약 이 커밋에 태그가 있으면 (HEAD -> main, tag: v1.0)처럼 표시됨 예제: --decorate 없는 출력git log..
2024.07.25 -
Refs
💡 Git refs 시스템Git은 객체 기반의 분산 버전 관리 시스템이며, 모든 객체는 불변의 해시값(SHA-1 혹은 SHA-256)으로 식별됩니다. 이때 refs는 이러한 해시를 사람이 기억할 수 있고 관리할 수 있는 식별자(브랜치, 태그 등)로 연결해 주는 이름-값 매핑 시스템입니다. 📁 1. refs의 위치와 구조Git 저장소는 .git 디렉토리 안에 아래와 같은 구조를 가집니다..git/├── HEAD├── refs/│ ├── heads/│ │ ├── main│ │ └── feature/login│ ├── tags/│ │ └── v1.0│ └── remotes/│ └── origin/│ └── main├── packed-refs 각 ..
2024.07.24 -
git diff
보호되어 있는 글입니다.
2023.12.12 -
Tracking branch와 Upstream
트래킹 브랜치(tracking branch)와 업스트림(upstream)는 Git에서 로컬 브랜치와 원격 브랜치 간의 연결(연관 관계)을 나타내는 핵심 개념입니다. 이 개념들은 fetch, pull, push와 같은 원격 저장소와의 상호작용에서 자동화와 명확성을 제공합니다. 이 두 용어는 밀접하게 연관되어 있으며, 경우에 따라 서로 동의어처럼 사용되기도 하지만, 엄밀히는 약간의 차이가 존재합니다. 🔑 요약용어정의예시Tracking Branch로컬 브랜치에 연결된 원격 브랜치my-feature → origin/my-featureUpstream Branch현재 체크아웃된 브랜치가 기본적으로 push/pull할 대상으로 설정된 원격 브랜치main → origin/main 🧠 트래킹 브랜치(Tracking..
2023.06.30