콘텐츠로 이동

Git 명령

제품정보 Git 명령 및 모든 플랫폼에서 버전 제어를위한 워크플로우.

기본 명령

| | Command | Description | | | --- | --- | | | git init | Initialize a new Git repository | | | | git clone <url> | Clone a repository from remote URL | | | | git status | Show working directory status | | | | git add <file> | Add file to staging area | | | | git add . | Add all files to staging area | | | | git commit -m "message" | Commit staged changes with message | | | | git push | Push commits to remote repository | | | | git pull | Pull changes from remote repository | |

채용 정보

| | Command | Description | | | --- | --- | | | git branch | List all branches | | | | git branch <name> | Create new branch | | | | git checkout <branch> | Switch to branch | | | | git checkout -b <name> | Create and switch to new branch | | | | git merge <branch> | Merge branch into current branch | | | | git branch -d <name> | Delete branch | |

원격 작업

| | Command | Description | | | --- | --- | | | git remote -v | Show remote repositories | | | | git remote add <name> <url> | Add remote repository | | | | git fetch | Fetch changes from remote | | | | git push origin <branch> | Push branch to remote | | | | git pull origin <branch> | Pull branch from remote | |

고급 명령

| | Command | Description | | | --- | --- | | | git log --oneline | Show commit history in one line | | | | git diff | Show changes between commits | | | | git reset --hard <commit> | Reset to specific commit | | | | git stash | Temporarily save changes | | | | git stash pop | Apply stashed changes | | | | git rebase <branch> | Rebase current branch | | | | git cherry-pick <commit> | Apply specific commit | | | | git tag <name> | Create a tag | |

일반 작업 흐름

기능 분지 Workflow

카지노사이트

핫픽스 Workflow

카지노사이트

최고의 연습

본문 바로가기

  • 현재 긴장을 사용 ("Add feature" not "Added feature")
  • 50자 미만의 첫 줄 유지
  • 몸은 무엇을 설명하고 왜, 방법
  • 적용 가능한 경우 참조 문제 및 풀 요청

Branching 전략

  • descriptive 분지 이름
  • 단일 기능에 집중된 지점 유지
  • 합병 지점
  • 일반적으로 주요 지점과 동기화

Repository 관리

  • 사용 .gitignore 불필요한 파일을 제외
  • atomic을 유지하고 집중
  • 의미있는 커밋 메시지
  • 태그 사용
  • 원격 저장소에 일정한 백업