코드 가져오기

git clone <git-address>

버전 업데이트

git add <filename>
git commit -m "commit message"
git push <remote_name> <branch_name>

예시)

git add *.c
git commit -m "기능 추가"
git push test_branch main

레포지토리에 업데이트 된 코드 가져오기

git pull <remote_name> <branch_name>

이전 버전 코드로 롤백

git reset --hard

github main 최신 상태로 롤백

git fetch origin
git reset --hard origin/main