https://github.com/JINJUN941003/TIL/blob/main/git/220816-commands.md
GitHub - JINJUN941003/TIL: Today I learned
Today I learned. Contribute to JINJUN941003/TIL development by creating an account on GitHub.
github.com
git shell commmand
What is shell? : Software that connect kernel and users.
CLI: Command Line Interface
pwd : print working directory
ls : list segment
cd : change doucments
ls -a : list segment - all (숨김파일까지)
cd .. : going parent folder
ls -l : list segment - line by line Want to know details.
ls -al : list segment - all line by line
mkdir directory_name : make directory
touch filename.fileformat : making file
cp : copy, making copy write like 'cp filename.fileformat'
rm : remove, remove file
rm filename.* : remove file that name with 'filename'
mv olderfilename newerfilename : move, using if you want to change filename.
rm -r : remove -repository,
cat filename : concatenate filename,
vi or vim filename : open vi editors
Vim Command
i - insert mode
ESC - back to normal mode
:q - quit
:w - write
:wq - write and quit
Git Process Flow and Command
Local
working directory -- git add --> staging area -- git commit --> localrepo
Remote
localrepo - git push -> remote repo
Start project with git clone
git clone { repository address }
- git hub에서 통쨰로 가져온다.
git add filename : working directory --> staging area
git commit filename : staging area --> localrepo
git push : localrepo --> remote repo
git push origin main
Conventional Commits
- commit의 제목은 commit을 설명하는 하나의 구나 절로 완성
- prefix 꼭 달기
- feat: feature, 기능개발 관련
- fix : fix bug, 오류개선 혹은 버그 패치
- docs : documents, 문서화 작업
- test : test, test 관련
- conf : configration, 환경 설정 관련
- build : about build, 빌드 관련
- ci : continuous integration 관련
Remeber things when do commit
- commit은 동작 가능한 최소단위로 자주 할 것.
- 해당 작업단위에 수행된 모든 파일 변화가 해당 commit에 포함되어야 함.
- 모두가 이해할 수 있는 log를 작성할 것.
- Open Source Contribution시 영어가 강제되지만, 그렇지 않을 경우 팀 내 사용 언어를
따라 쓸 것. - 제목은 축약하여 쓰되(50자 이내), 내용은 문장형으로 작성하여 추가설명 할 것.
- 제목과 내용은 한 줄 띄워 분리할 것.
- 내용은 이 commit의 구성과 의도를 충실히 작성할 것
'Git & Github' 카테고리의 다른 글
Git & Git hub 03 (0) | 2022.09.13 |
---|---|
Git & Git hub 02 (0) | 2022.08.19 |