Git
-
브랜치 시작하기Git 2023. 2. 19. 12:41
# 브랜치! - 하나의 코드 관리 흐름 yunajoe@DESKTOP-ULNOHTM MINGW64 ~/Desktop/Git_Practice (master) $ git status On branch master Your branch is up to date with 'origin/master'. nothing to commit, working tree clean yunajoe@DESKTOP-ULNOHTM MINGW64 ~/Desktop/Git_Practice (master) $ git history 75494b3b9c8516938bbf65d1fdf5ee8348cef63f (HEAD -> master, tag: Version_2, origin/master) Add multiply function 23453a2..
-
git resetGit 2023. 2. 19. 11:13
HEAD - 어떤 커밋 하나를 가리킴 - HEAD가 가리키는 커밋에 따라 working directory구성 git reset - 과거 커밋으로 아예 돌아가고 싶을 때 - HEAD가 과거의 커밋을 가리키게 할 수 있따 - working directory의 내용도 과거 커밋을 가리키게 할 수 있다 yunajoe@DESKTOP-ULNOHTM MINGW64 ~/Desktop/Git_Practice (master) $ git history 75494b3b9c8516938bbf65d1fdf5ee8348cef63f (HEAD -> master, origin/master) Add multiply function 23453a29860fb3bce2a87749717bfd6f1dfc0100 Add the info in RE..
-
커밋메시지 다루기 (m옵션 없이 메세지 남기기, 최신 커밋 수정하기, as로 별칭 만들기, 두 커밋 간의 차이보기)Git 2023. 2. 19. 10:12
calculator.py 수정하기 calculator.py # 기본계산기 def add(a,b): return a + b def subtract(a,b): return a - b def multiply(a,b): return a + b git add . git commit i를 눌러서 편집모드로 간다 저장은 ESC + :wq! git log에서 확인해보기 commit aaf39bfb5bccf75a27daaee533070234bab08501 (HEAD -> master) Author: yunajoe Date: Sat Feb 18 20:02:32 2023 +0900 Add one function calculator.py supports 3 functions now : commit 23453a29860fb3b..
-
커밋 히스토리Git 2023. 2. 19. 10:01
커밋 히스토리 보기 git log yunajoe@DESKTOP-ULNOHTM MINGW64 ~/Desktop/Git_Practice (master) $ git log commit 23453a29860fb3bce2a87749717bfd6f1dfc0100 (HEAD -> master, origin/master) Author: yunajoe Date: Sat Feb 18 18:19:35 2023 +0900 Add the info in README.md commit 74b3b85cae59f4dc2daaee15110fc7724a1812a1 Author: yunajoe Date: Sat Feb 18 17:19:29 2023 +0900 readme수정 commit b69451e5813c4f433746acbf77a92..
-
오픈소스(Open Source) & Glt Clone해보기Git 2022. 9. 22. 10:08
# 오픈소스(OpenSource) GitHub에는 훌륭한 프로젝트들이 많습니다. 그리고 이런 프로젝트는 대부분 그 소스 코드가 공개되어 있습니다. 이렇게 소스 코드가 공개되어 있는 프로젝트를 '오픈 소스 프로젝트(open source project)'라고 하는데요 ‘오픈 소스’가 뭘까요? 간단히 설명하자면 프로그램의 소스 코드가 대중에 공개된 상태일 때 오픈 소스라고 합니다. 오픈 소스라는 용어의 의미는 그것이 생겨난 역사적 배경을 살펴보면 좀더 잘 이해할 수 있습니다. =========================================== 하지만 컴퓨터 프로그램 시장이 발전하면서 특정 회사가 어떤 프로그램을 만들고 그 사용료 등을 받는 것이 일반화되기 시작했는데요. 이런 변화와 함께 프로그램의 ..
-
Remote repository와 Local repository를 연결해보기Git 2022. 9. 17. 19:30
# Local repository의 내용을 Remote repository에 반영하기 # github repository를 하나 만들어 보자 깃허브의 레포지토리 => 원격 레포지토리 or 리모트 레포지토리 내 컴퓨터의 레포지토리 => 로컬 레포지토리 ================== 로컬 레포지토리를 깃허브의 레포지토리에 업로드 해보자 # 로컬 레포지토리를 만들고 커밋을 한 후에 깃허브에 업로드하기 …or create a new repository on the command line echo "# Git_Practice" >> README.md git init git add README.md git commit -m "first commit" git branch -M main git remote add ..
-
Git시작하기Git 2022. 9. 17. 17:19
Git이란?! 1. 레포지토리(repository) - 커밋이 저장되는 곳 2. 커밋commit - 프로젝트 디렉토리의 특정 모습을 하나의 버전으로 남기는 행위 & 결과물 repository만들기 yunajoe@yunajoe MINGW64 ~/Git $ mkdir MathTool yunajoe@yunajoe MINGW64 ~/Git $ cd MathTool yunajoe@yunajoe MINGW64 ~/Git/MathTool $ git init Initialized empty Git repository in C:/Users/yunaj/Git/MathTool/.git/ => 비어있는 레포지토리를 생성 yunajoe@yunajoe MINGW64 ~/Git/MathTool (master) $ ls -al to..