Git 실습
Linux 세션 때 만든 wecode 폴더로 이동
cd Desktop/wecodewecode 폴더 안에 git_practice 폴더 생성
mkdir git_practiceGit 시작 :
- git 초기화
1
2
3
4
5
# git_practice으로 이동
cd git_practice
# git 초기화
git init
- .git 폴더 확인
ls-al
- 본인영문이름.md 파일 생성
touch kanghoyoo.md - 해당 파일에서 본인 이름 작성 후 저장
- vim 편집기 실행
vi kanghoyoo.mdinsert 모드 전환 후 내용 작성 및 저장 - git 상태 확인
git status
- vim 편집기 실행
- Staging(중간 저장)
git add- git status로 상태 변화 확인
- Commit
git commit -m "메세지- git status로 상태 변화 확인
- Commit history 확인
git log - Github repo 생성
github 사이트 → New repository - git_practice 폴더와 github repository 연동
git remote add origin repository주소 - git push
git push origin main