본문 바로가기
개인공부

[Git] github / git 설치 및 연동 방법

by 죠졍니 2024. 1. 29.
728x90
반응형
SMALL

 

 

 

안녕하세요!

버전 관리 및 협업을 위한 도구는 다양하게 있는데요

그중 가장 보편적으로 사용하는  github에 대해 공부해 보겠습니다

 

 

 

환경설정 먼저 해볼게요~

 

 

 

1. git이 먼저 깔려있는지 확인

 

cmd창으로 들어가서

git --version

git 버전을 확인하는 명령어 입니다.

 

이렇게 버전이 나오면 설치 안하셔도 되구요, 없다고 나오면 다운 받으시면 됩니다!

 

 

2. git/github 설치

 

https://github.com/

 

GitHub: Let’s build from here

GitHub is where over 100 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 fea...

github.com

 

회원가입을 먼저 합니당

 

 

https://git-scm.com/downloads

 

Git - Downloads

Downloads macOS Windows Linux/Unix Older releases are available and the Git source repository is on GitHub. GUI Clients Git comes with built-in GUI tools (git-gui, gitk), but there are several third-party tools for users looking for a platform-specific exp

git-scm.com

 

해당하는 운영체제에 맞는 버전으로 설치 하세요!

 

 

3. 경로 이동

윈도우 검색창에 git bash라고 검색해보시면

이렇게 cmd창 같이 생긴 창이 뜰겁니다!!

 

 

 

창을 띄우고 파일탐색기에서 내가 만들고 싶은 폴더를 하나 만드세요!

저는 mygit이라는 폴더를 만들었습니다!

 

 

4. 폴더 경로로 이동

자, 이제 다시 git bash에 들어가서 만든 폴더의 경로로 이동하세요!

 

1)경로로 이동하는 명령어

cd /{경로}

 

 

2)현재 경로 조회 명령어

pwd

 

 

 

 

5. git bash 명령어 실행

 

내 닉네임과 연동

git config --global user.name "{닉네임}"

 

내 이메일주소와 연동

git config --global user.email "{이메일주소}"

 

현재 디렉토리 기준 Git 저장소가 생성

git init

 

파일 추가

git push origin "{파일명} 추가"

 

푸쉬

git push origin master

 

 

이상으로 마치겠습니당

 

728x90
반응형
LIST