목록Dev/Git (4)
serendipity

Git 이란? : 형상관리 도구, 버전관리를 위한 프로그램 (Version Control System) "Git은 버전 관리, 협업을 가능할 수 있게 해준다!" 정도로 기억하기. https://git-scm.com/book/ko/v2 (공식 문서) 소스코드를 주고 받을 필요 없이, 같은 파일을 여러 명이 동시에 작업하는 병렬 개발이 가능 분산 버전관리이기 때문에 인터넷이 연결되지 않은 곳에서도 개발을 진행할 수 있으며, 중앙 저장소가 날라가버려도 다시 원상복구 가능GIT을 통해 버전 관리를 하면 체계적인 개발이 가능해지고, 프로그램이나 패치를 배포하는 과정도 간단 Git 영역 working directory : 현재 작업하고 있는 공간으로, Git이 관리하고 있지만 아직 추적( track )하고 있지 않..

🐼 Get the latest changes from origin (no merge) $ git fetch Fetch the latest changes from origin and merge $ git pull Fetch the latest changes from origin and rebase $ git pull --rebase Push local changes to the origin $ git push * compulsion $ git push -f

🐱 List all local branches $ git branch List all branches, local and remote $ git branch -av Switch to a branch, my_branch, and update working directory $ git checkout my_branch Create a new branch called new_branch $ git branch new_branch Delete the branch called my_branch $ git branch -d my_branch Merge branch_a into branch_b $ git checkout branch_b $ git merge branch_..

🐯 Create a new local repository $ git init [project name] Download from an existing repository $ git clone my_url 🦊 List new or modified files not yet committed $ git status Show the changes to files not yet staged $ git diff Show the changes to staged files $ git diff --cached Show all staged and unstaged file changes $ git diff HEAD Show the ..