add, commit, push, pull

  • 고준희

    <기본> git config —global [user.name](http://user.name) "이름" git config —global [user.email](http://user.email) "메일주소" init [add, add . , add directory] [commit -m "", commit -am " ",commit —amend], status, [log, log -p, log —stat] diff, checkout version id, reset —hard version id, revert version id, (git ignore) git log -all --graph --oneline git branch, git branch (branch name) git merge branch이름(현재 위치한 branch로 입력한 branch를 merge) git remote add git remote : 원격 연결된 이름 보여줌 git remote -v : url주소 보여줌 git push, git clone , git pull ---
  • 김건호

    ## 기본적인 Git 명령어

    copy, create, change, combine

    • git init: 새로운 Git repository를 initialize하고 기존 디렉토리 추적을 한다. 기존 폴더에 버전 컨트롤에 필요한 내부 자료 구조를 저장할 숨겨진 subfolder를 추가한다.
    • git clone: 이미 원격으로 존재하는 프로젝트의 local 복사본을 생성한다. 복사본엔 프로젝트의 모든 파일, history 및 branch가 포함된다.
    • git add: 변경 사항을 staging area에 올린다. git은 개발자의 codebase변화를 추적할 수 있지만, 그러기 위해선 변경 사항을 staging area에 올리고 snapshot을 만들어 프로젝트 history에 추가해야 한다. 이 명령어는 두 가지 단계중 staging 단계에 포함된다. staged된 어느 변경사항이든 다음 snapshot와 프로젝트 history의 일부가 될 것이다. 스테이징 및 커밋을 수행하면 개발자는 코드와 작업 방식을 변경하지 않고도 프로젝트 기록을 완벽하게 제어할 수 있다.
    • git commit: snapshot을 프로젝트 기록에 저장하고, 변경 사항 확인 프로세스를 완료한다. 사진 한장을 찍는 것과 비슷하다. git add로 올려진(staging) 어떤 것이든 git commit을 통해 snapshot의 일부가 된다.

    ### summary

    git init: git을 디렉토리에 초기화 git add ‘file_name’: 해당 파일을 버전관리할 준비된 상태로 만듦. (staging area에 올린다.) git commit -m ‘message’: staging area에 있는 파일들을 ‘버전’으로 만듦.