Github
-
[Git] 브랜치 관련 명령어Github 2023. 5. 27. 23:35
브랜치 삭제 후 원격에 push git remote update git push origin --delete 브랜치명 원격 저장소에 있는 branch를 삭제하면서 push까지 한 방에 하기 로컬 브랜치 삭제 git branch -D 브랜치명 원격에 있는 브랜치 확인 git branch -r 브랜치명 변경 git branch -m 브랜치명 브랜치 생성과 체크아웃 한번에 하기 git checkout -b 브랜치명 특정 branch pull 받기 git clone -b
-
[Git] Fork한 레포지토리에서 pull 받기Github 2023. 1. 18. 14:50
처음에 그냥 포크받은 내 레포지토리에서 git pull 명령어를 입력하니 이렇게 뜸 yeonsu@MacBook-Pro-2 Reborn_Front % git pull Already up to date. git remote -v git remote add upstream 기존 레포지토리 주소 yeonsu@MacBook-Pro-2 Reborn_Front % git remote -v originhttps://github.com/yeonsu0-0/Reborn_Front.git (fetch) originhttps://github.com/yeonsu0-0/Reborn_Front.git (push) yeonsu@MacBook-Pro-2 Reborn_Front % git remote add upstream https:/..
-
[Mac/Github] 하나의 repository에 여러 개의 프로젝트 폴더 올리는 방법Github 2022. 8. 20. 02:31
이 방법을 찾아내기 전에는 직접 github에서 Add file을 눌러 파일들을 일일이 첨부해주는 식으로 업로드를 했는데, 문제점은 아무리 커밋 메세지를 남겨도 히스토리가 남지 않는다는 점이었다... 여러번의 삽질과 구글링 끝에 하나의 repository 안에 여러 프로젝트를 만들고, 폴더 별로 업로드하는 방법에 대해 알아내서 기록하고자 한다 1. 새로운 repository를 생성해준다 2. 여러 개의 프로젝트가 모여있는 '최상위 폴더' 에서 마우스 오른쪽을 눌러 해당 위치의 터미널을 연다 3. 순서대로 따라해준다 (README.md 파일을 추가해주지 않으면 branch -M 부분에서 오류가 난다) 4. ⭐️ 폴더들을 따로따로 add 해준 뒤에 커밋 메세지를 작성한다 예시) git add ./DiceGa..
-
[Git] 브랜치(Branch)생성 및 업로드Github 2022. 7. 23. 23:38
브랜치란? 특정 커밋을 가리키는 포인터이다 [브랜치 생성] git branch 브랜치이름 예시) git branch develop 입력 후 git log 를 통해 확인해보면 HEAD가 가리키던 master 브랜치에 develop 브랜치도 같이 가리키는 것을 확인할 수 있다. [HEAD가 develop을 가리키게 하는 방법] git checkout develop 3 STEP (1) 브랜치 생성: git branch 브랜치이름 (2) HEAD가 브랜치를 가리키게 하기: git checkout 브랜치이름 (3) commit하기 git log 확인 git log --all --graph --all HEAD가 가리키는 브랜치 뿐만 아니라 모든 브랜치를 보겠다는 것이다 --graph 브랜치와 커밋의 관계를 그래프 ..
-
[Git] github에 업로드 하기Github 2022. 7. 22. 20:27
1. github에 레파지토리 생성 후 복사하기 2. 터미널에서 명령어 입력 후 붙여넣기 git remote add origin URL - git remote 내 컴퓨터에서 외부 저장소에 관한 작업을 할 때 사용하는 명령어 - add origin URL URL이 가리키는 외부 서버의 프로젝트를 원격 저장소로 지정하는데, 그 이름은 origin이라고 설정하는 것 매번 긴 URL을 입력하기 복잡하기 때문에 이름을 지정해서 쉽게 언급하겠다는 것이다 3. Push git push -u origin master 내 컴퓨터의 프로젝트 디렉토리 내용을 origin이 가리키는 원격 저장소의 프로젝트로 업로드한다 - git push 현재 내 프로젝트의 내용을 전부 origin에 업로드 -u, master 브랜치 개념 필..
-
[Git] 참고 사이트 모음Github 2022. 7. 21. 15:40
Git 터미널 단축키 [Git] Git 사용법 및 터미널 명령어 정리 pwd Print working directory; 현재 작업 위치 알려줌. ls list files; 현재의 directory의 모든 파일들을 보여줌. cd .. 상위 디렉토리로 이동.cd ~ 사용자의 홈디렉토리(/Users/hannah)로 감. velog.io Git 튜토리얼 누구나 쉽게 이해할 수 있는 Git 입문~버전 관리를 완벽하게 이용해보자~ | Backlog 누구나 쉽게 알 수 있는 Git에 입문하신 것을 환영합니다. Git을 사용해 버전 관리를 할 수 있도록 함께 공부해봅시다! backlog.com
-
[기초 지식] git에 대한 이해 & 버전 관리 방법Github 2022. 7. 17. 23:46
Git이란? Git: 프로젝트의 버전 관리를 하기 위해 사용하는 프로그램 Github: Git 기반의 저장소 서비스 git으로 개발 중인 프로젝트의 버전을 관리할 수 있고, 다른 개발자와 함께 관리하면서 협업하는 것이 가능하다. Git으로 버전 관리하기 1. 프로젝트 디렉토리(폴더)를 생성한다. 2. 터미널에서 git init 명령어를 입력한다. -> 해당 프로젝트 디렉토리는 git으로 버전관리를 할 수 있는 상태가 된다. (디렉토리 안에 .git이 생성되나 눈에는 보이지 않음) 3. git config user.name "이름", git config user.email "이메일" 명령어를 통해 사용자 정보를 입력한다. commit: 특정 정보를 저장하는 것 Working Directory Staging..