튜토리얼을 진행하기 위해서는 먼저 깃허브 계정을 생성해야 합니다.
GitHub: Where the world builds software
GitHub is where over 56 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and feat...
github.com
튜토리얼에서 다음의 내용을 배울 수 있습니다.
- GitBash 설치
- New Repository 생성
- Root Folder 연결
- Push 전엔 Pull이 있다
What is GitHub ?
깃허브는 버전 관리와 협업을 위한 코드 호스팅 플랫폼입니다.
깃허브를 사용하면 다른사람들과 어디서든지 프로젝트 작업을 할 수 있습니다.
이 튜토리얼은 깃허브의 필수적인 것을 가르칩니다.
Step 1. GitBash 설치
Git for Windows
Git for Windows focuses on offering a lightweight, native set of tools that bring the full feature set of the Git SCM to Windows while providing appropriate user interfaces for experienced Git users and novices alike. Git BASH Git for Windows provides a BA
gitforwindows.org
사이트에 접속하여 Download를 눌러 설치하면 됩니다.
Step 2. New Repository 생성
GitHub: Where the world builds software
GitHub is where over 56 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and feat...
github.com
- step 1 설치를 마치고, 깃허브로 이동하여 로그인을 합니다.
- New repository를 클릭하면 아래와 같은 화면이 출력됩니다.
- Repository는 깃허브에서 나만의 공간을 만든다고 생각하시면 됩니다.
- Repository name을 입력 후 사람들에게 나의 공간을 공개하려면 Public 비공개처리는 Private를 설정하면 됩니다.
Step 3. Root Folder 연결
Root Folder란 웹 상의 Git과 연결될 Local Folder입니다.
- 원하는 위치에 새폴더를 생성합니다.
- 원하는 위치에 새폴더를 생성합니다.
- 다음은 Root Folder에 연결하는 Command를 사용합니다.
Command
git init
git remote add origin repository address
- Git Bash Here 클릭합니다.
- 커맨드 창에 git init을 입력후 git remote add orgin github.com/parksence/WebProject.git 이라고 입력합니다.
- git remote add orgin 까지는 동일하게 입력 후 뒷 링크는 위 사진처럼 본인의 링크를 복사 후 마우스 우클릭 후 paste를 합니다.
Step 4. Push 전엔 Pull이 있다
- Push는 말 그대로 자료를 Repository로 올리는 것이고, Pull은 그 반대로 자료를 가져오는 것입니다.
- 반드시 기억하여야 할 부분은 푸쉬 전에는 풀이 있다는 것입니다.
Command
- git pull origin master (지정 해놓은 Repository에서 끌어옵니다.)
- git status (현재 나의 로컬 폴더와 Git 과의 상태를 Check 합니다.)
- git add . (로컬폴더와 Repository사이의 변경된 사항이 있을 때, 그 변경된 모든 파일을 Tracking 해달라는 명령어입니다.
- git commit -m "message" (message 부분에 인식 할 수 있는 commit을 달아줍니다.)
- git push origin +master (실제로 Git에 Push)
F A Q
git commit 을 하는 단계에서 아래와같은 에러메세지가 나오실때 해결 방법입니다 !
Please tell me who you are .Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. 해당 에러 메세지는 " 그래 이제 너가 설정해놓은 repository에 commit을 할껀데 그전에, 너는 누구야 ? " 를 묻는건데요, 에러 메세지에서 말해주는대로 $ git config --global user.name "user name" $ git config --global user.email "user e-mail" 을 적어주시면 됩니다 :)
'DEV' 카테고리의 다른 글
[eXbulider6] 네임스페이스 명명 메모 (0) | 2021.02.22 |
---|---|
[eXbuilder6] 임베디드앱 정리 (1) | 2021.02.22 |
[eXbuilder6] 시작하기 2 - 이벤트 및 메뉴 등록 (1) | 2021.02.18 |
[eXbuilder6] 시작하기 1 (0) | 2021.02.18 |
[자료구조] data structure (0) | 2021.01.18 |