깃헙 세팅 및 여러가지 기능
Github 편하게 써보자!
GitHub는 docs.adobe.com 내용을 저장하는 데 사용되는 Git 리포지토리와 같은 Git 리포지토리용 웹 기반 호스팅 서비스입니다. 모든 프로젝트에 대해 GitHub는 주 리포지토리를 호스팅하며, 여기에서 기여자는 자신의 작업에 대한 복사본을 만들 수 있습니다.
Github 초기 설정
깃헙은 커밋할 때 마다 사용자 정보를 기록하고, 편집기 설정에 따라 메세지를 작성할 수 있다.
터미널에서 github 버전 확인하기
“git version”으로 gighub 버전을 확인한다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
git version
------------
git version 2.44.0.windows.1
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.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
name과 email을 확인합니다.
본인의 이메일 꼭 확인한다.
1
2
user.name="머원"
user.email=sdw10195@gmail.com
유저 이름/메일 변경하기
유저 이름/메일을 변경할 수 있다.
1
2
3
4
git config --global user.name "머원"
git config --global user.email "sdw10195@gmail.com"
-----------
만약에 내것이 아니면 이름을 변경해야 합니다.
Git 상태 확인하기
업데이트 할 파일이 있는지 확인 할 수 있다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
git status
-----------
On branch main
Your branch is up to date with 'origin/main'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: effect/index.html
new file: json/1samupgisa.json
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: effect/index.html
모든 파일 준비 상태
commit하기 전 준비 상태이다.
1
2
3
4
5
6
7
8
9
git add -A
-----------
C:\Users\line\Documents\GitHub\seodaewon1.github.io>git status
On branch main
Your branch is up to date with 'origin/main'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: _posts/coding/2024-04-08-github.md
commit 완료
push하기 전 파일을 올리기 전 상태이다.
1
2
3
4
5
6
git commit -m "2024.04.08"
[main 82264a6] 2024.04.08
2 files changed, 663 insertions(+)
create mode 100644 effect/index.html
create mode 100644 json/1samupgisa.json
Github 올리기
파일을 Github에 올리는 작업이다.
1
2
3
4
git push -u origin main / git push
branch 'main' set up to track 'origin/main'.
Everything up-to-date
This post is licensed under CC BY 4.0 by the author.
