https://wansook0316.github.io/dv/concept/2021/07/19/Git-Tutorial.html
유저이름 설정
git config --global user.name "your_name"
이메일 설정
git config --global user.email "your_email"
정보확인하기
git config --list
-------------------------------------------------------------------------------------
git init //해당 로컬폴더를 연동하기 위해 초기화하기 -> .git 숨김폴더 만들어짐
git remote add origin 깃허브 레퍼지토리 주소 //해당 레퍼지토리와 연결
git remote -v //연결내용 확인
-------------------------------------------------------------------------------------
git status //폴더의 상태 확인(삭제, 추가파일 등)
git add . //모든 파일 더하기
git commit -m "커밋할 때 메시지" //히스토리 만들기
git push origin master 또는 main //깃허브에 올리기
-------------------------------------------------------------------------------------
git pull origin master 또는 main //깃허브에서 가져오기
git code .
[core]
editor = code
autocrlf = true
editor = code --wait
[user]
name =
email = @gmail.com
[pull]
rebase = false
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
[alias]
st = status
hist = log --graph --all --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(white)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --date=short
[mergetool]
keepBackup = false
git config -e
git config --global -e
[core]
editor = code
autocrlf = true
editor = code --wait
[user]
name =
email =
[pull]
rebase = false
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
[alias]
st = status
hist = log --graph --all --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(white)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --date=short
[mergetool]
keepBackup = false
[remote "origin"]
url =
fetch = +refs/heads/*:refs/remotes/origin/*
깃허브(GitHub) 프로젝트에서 팀원들과 함께 작업하는 방법은 다음과 같은 일반적인 절차를 따릅니다:
git init
명령어를 실행하여 해당 폴더를 Git 저장소로 초기화합니다.git remote add origin <GitHub 저장소 URL>
명령어를 사용하여 로컬 저장소와 원격(GitHub) 저장소를 연결합니다.git add <파일 이름>
명령어로 스테이징(staging) 영역으로 추가한 후, git commit -m "<커밋 메시지>"
명령어로 커밋(commit)합니다.git push origin <브랜치 이름>
명령어를 사용하여 변경 사항을 원격(GitHub) 저장소에 push합니다.git pull origin <브랜치 이름>
명령어를 사용하여 원격(GitHub) 저장소의 최신 변경 사항을 가져옵니다.위의 단계들은 기본적인 Git 작업 흐름입니다. 필요에 따라 branch(브랜치), merge(병합), pull request(풀 리퀘스트) 등의 기능도 활용할 수 있습니다.