Git

GITHub 깃헙시작하기 개발자로서의 첫걸음 Git Bash로 관리하는 방법

쏠솔랄라 2023. 3. 25. 19:57

 

 

GitHub을 시작했다고 했더니 현직자 친구로부터

이제 진정한 개발자로서의 첫걸음이라고 농담을 하더라구요

 

 

https://git-scm.com/download/win

 

Git - Downloading Package

Download for Windows Click here to download the latest (2.39.2) 32-bit version of Git for Windows. This is the most recent maintained build. It was released 10 days ago, on 2023-02-14. Other Git for Windows downloads Standalone Installer 32-bit Git for Win

git-scm.com

 

 

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

 

 

 

 

OS에 맞게 다운로드

 

 

 


 

 

수많은 시행착오 끝에

올리고자 하는 파일에서 직접적으로 Git Bash를 사용하기로 했습니다

 

 

 

 

업로드하고자 하는 폴더에서 마우스 우클릭하여

Git Bash Here로 열기

 

 


 

 

GitHub 최초 1회 세팅

 

[git --v] 또는 [git --version] 입력해서 현재 버전 확인



git config --global user.name "id" ; 깃헙 아이디 입력
git config --global user.email "you@exmaple.com" ; 깃헙 계정 입력

 


git remote add origin [repository경로]  

git repository연결 최초1회

 

git config --list ; config 상태 리스트 확인

 

 

GitHub 기본 업로드 루틴

 

git init ; 초기화
이 폴더의 경로를 새롭게 시작하겠다

 

 

git remote -v ; 경로 & 연결 확인

fetch와 push폴더값 보여집니다

 


git status ; main, branch 및 상태 확인

default setting은 git status가 master branch로 되어 있는데

저는 master branch가 없으니 변경해 보겠습니다

 


git branch -M ex(브랜치명) ; 브랜치 신규 생성 or 변경

 

 

git add .
현재 폴더의 모든 폴더와 하위 파일들을 업데이트

 


git commit -m "올리고 싶은 멘트"

 

git pull origin ex

pull을 먼저 해줘서 원격 저장소와 로컬 저장소 상태를 같게 한 다음 push를 해주면 된다.


git push -u origin ex ; 

 

 

이렇게 데일리 루틴 완료!

아직까지는 이 루틴 내에서는 오류가 나지 않습니다

 

지금은 기본 코드를 천천히 올리고 있는데

앞으로 더 많은 것들과 프로젝트까지 꾸준히 올려보려고 해요

 

이 과정에 도달하기까지 겪었던 수많은 에러들은

천천히 정리해서 하나씩 올려 보겠습니다