Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

개발자 되버리기

github 명령어 본문

개발/Github

github 명령어

구본익 2017. 6. 28. 08:17

giGit 설치하기 - https://git-scm.com/downloads


2) 미리 저장되어 있을지 모를 계정정보 삭제 (처음설치시 생략가능 )

# git config --global --unset credential.helper

# git config --system --unset credential.helper


3) 본인계정 이메일 (Github 계정이메일)과 이름(본인 영문이름 , Github아이디 X)

을적자

# git config user.email “exam@abcd.com”

# git config user.name "Koo bonik”


Git 상태확인 명령어

# git show       // 내 계정 연결 상태 확인

# git log          // 로그확인

# git shortlog   // 짧은 로그 확인

# git diff        // 이전과 달라진점 확인

# git status      // 상태 확인


Git 설정

# git init             //git 사용 가능하도록 폴더 설정하기

# git add 파일명   // commit 할 파일 add 하기

# git reset            //add 한거 취소하기

# git commit -m "수정 사항 추가" // commit 하기

# git commit -sm "수정 사항 추가" //서명 commit 하기

# git reset HEAD~1                //가장 최근 commit 지우기


원격 저장소 생성

# git remote add origin URL // 원격 저장소 등록

# git push origin master       //원격 저장소(origin)에다가 밀어넣기

# git push origin master --forec // 강제로 push하여 수정하기


pull-request 하기 (A가 작업한거 내가 수정해서 A한테 보내기)

# git clone URL //fork한 repo 받아오기

# git pull //원격지에 변경내용을 로컬 디렉토리에 가져오기


pull-request 브랜치 따로 만들기(같은 폴더에 다른 세상 만들기)

# git checkout -b develop


git 원격지 변경

# git remote set-url origin <url>


git 원격에서 강제로 로컬 덮어쓰기

# git fetch --all

# git reset --hard origin/master

# git pull origin master


git 비밀번호 캐시

한달정도 입력 안받기

git config --global credential.helper 'cache --timeout=2592000'

Comments