Post

Github 셋팅 및 여러가지 기능

깃헙 편하게 써보기 ! 😉👍

Git은 소스 코드 버전 관리 시스템(VCS, Version Control System) 중 하나로, 소프트웨어 개발에서 코드의 변경 이력을 효과적으로 관리할 수 있게 해주는 도구입니다. Git을 사용하면 여러 개발자들이 동시에 작업하고 있는 프로젝트에서 발생하는 코드의 수정, 추가, 삭제 등의 변경 사항을 효율적으로 추적하고 관리할 수 있습니다.

깃헙 초기 설정

깃헙은 커밋할 때마다 사용자 정보를 기록하고, 편집기 설정에 따라 메세지를 작성할 수 있다.

Window 명령 프롬프트 에서 github 버전 확인하기

1
2
3
4
5
6
git version
git version 2.44.0.windows.1
kimhyeji1364@gamil.com

user.name=Hyeji1364
user.email=161557112+Hyeji1364@users.noreply.github.com

✅name과 email을 확인합니다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
C:\Users\Hyeji>git config --list
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/etc/ssl/certs/ca-bundle.crt
core.autocrlf=true
core.fscache=true
core.symlinks=false
pull.rebase=false
credential.helper=manager
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master
filter.lfs.required=true
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
user.name=Hyeji1364
user.email=161557112+Hyeji1364@users.noreply.github.com

✅만약에 내것이 아니면 이름을 변경해야 합니다.

1
2
git config --global user.name "HJ"
git config --global user.email "Hyeji1364@gmail.com"

📁github 폴더(directory) 까지 들어가기

1
dir > cd documents > cd Github > cd class2024

vscode에서 터미널 열기 - window

1
2
📁단축키 : ctrl + shift + `(역따옴표)

깃 상태 확인하기

1
2
3
4
5
6
7
8
9
10
11
12
13
✅dir -a

✅ git status
dir -a > git status > modifed -- 확인

✅ git add
git add > new file --- 확인

✅ git commit -m "메시지" : 메시지와 함께 커밋

 git commit -m "메시지" > create mode ~~~ 확인

✅git push -u origin main

Git 명령어 정리

깃헙을 사용하면서 가장 기본적이고 자주 사용하는 명령어들을 알아보겠습니다. 이 명령어들은 프로젝트 관리, 협업, 버전 관리 등 다양한 상황에서 유용하게 사용됩니다. 🚀

1
2
3
4
5
6
7
8
9
10
기본 명령어
🎈 git init : 새로운 깃 저장소를 초기화합니다.

🎈 git clone[URL] : 원격 저장소를 로컬로 복제합니다.

🎈 git add[파일명] : 특정 파일을 스테이징 영역에 추가합니다.

🎈 git commit -m "[커밋 메시지]" : 스테이징 영역에 추가된 파일들을 커밋합니다.

🎈 git push[원격 저장소 이름] [브랜치 이름] : 로컬 저장소의 변경사항을 원격 저장소에 반영합니다.
This post is licensed under CC BY 4.0 by the author.