DevOps 40

[Git] revert

revert는 reset과 달리 커밋을 되돌리는것이 아닌 새로운 커밋을 추가하여 소스코드를 되돌립니다. # revert된 내용이 commit 히스토리에 남습니다. git revert # 2개 이상의 commit을 revert 합니다. revert된 내용이 각각 commit 히스토리에 남습니다. git revert .. # --no-commit 옵션을 사용하면 revert된 내용이 바로 commit에 남지 않아 직접 commit 메시지를 기록할 수 있습니다. git revert --no-commit git commit -m git push

DevOps/Git 2022.09.21

[Git] stage & commit

Stage 올리고 내리기 아래 명령어를 정리했지만, Stage & Unstage를 처리하는 건 IDE의 기능을 이용하는 것이 훨씬 간편합니다. 변경파일 모두 스테이지 올리기 git add . 변경파일중 일부만 스테이지 올리기 git add ... git add ... 스테이지 파일 되돌리기 git reset HEAD git reset HEAD Commit Stage에 올라간 변경사항 대상으로 Commit이 적용됩니다. 커밋 작성하기 git commit -m "커밋 메시지를 여기에 작성하세요." 해더, 본문, 푸터 구분하기 - 해더, 본문, 푸터는 빈행으로 구분합니다. git commit -m "해더 본문 푸터" 커밋 수정하기 (로컬 스토리지내에) 마지막 커밋 메시지 수정하기 (아래 방법을 알기전 git ..

DevOps/Git 2022.08.02

[VSCode] Turbo Console Log

Turbo Console Log Turbo Console Log - Visual Studio Marketplace Extension for Visual Studio Code - Automating the process of writing meaningful log messages. marketplace.visualstudio.com VSCode 확장프로그램을 하나 소개하려합니다. Turbo Console Log는 타이핑없이 단축키로 console을 작성할 수 있게 도와주는 앱인데요. 익숙해지면 매우 편리해서 한번 사용해보시는 걸 추천드립니다. class Klass { function Punction { var os = 'window' console.debug("🚀 ~ file: Pile.tsx ~ lin..

DevOps/VSCode 2022.06.22

[MacOS] hosts 파일설정하기

local 환경에 서버를 실행했을 때 127.0.0.1(localhost) 서버로 접근할 수 있습니다. 하지만 개발하다보면 도메인에 따라 로직을 설정해야하는 경우와 같이 local 환경에서도 고정 도메인이 필요한 경우가 있는데요. 그럴 때 고정 도메인을 설정하는 방법을 소개하려 합니다. 일단 수정해야하는 파일의 경로는 아래와 같습니다. $ sudo vi /etc/hosts 파일을 열면 아래와 같이 기본적으로 설정된 local 환경의 도메인 주소들을 확인할 수 있습니다. localhost도 해당 파일에 설정되어 있네요. 이 파일에 원하는 도메인 주소를 추가해주면 됩니다. 아래 local.mooncode.com 이라는 주소를 추가했습니다. 이렇게 하면 개발환경에서 동작하는 서버를 local.moonscode..

DevOps/MacOS 2022.06.20

[MacOS] Amethyst (1) - 마우스없이 화면포커스컨트롤하기

Amethyst Amethyst | ianyh Tiling window manager for macOS along the lines of xmonad. A quick screencast of basic functionality can be found here. (It's rough, and I'd love to see a better one if someone has the skills and inclination to make one.) Getting Amethyst Amethyst is avail ianyh.com 안녕하세요. 오늘은 Amethyst 앱에 대해서 소개하려합니다. 애플리케이션 창을 컨트롤할 때 제가 정말 좋아하는 Spectacle이란 앱이 있는데요. (Spectacle 소개글 https..

DevOps/MacOS 2022.06.15

[Git] Fork - facebook/react에 contributor 되보기

나도 오픈소스의 contributor가 될 수 있다? 혹시 Fork에 대해서 알고 계신가요. 오늘은 Fork의 개념에 대해 소개해드릴까 합니다. Fork란 타인의 repository(이하 repo)를 개인 저장소로 복사하여 가져오는 행위를 말합니다. 그럼 git clone을 통해 repo를 내려받는 것과 내려받은 소스를 자신의 repo에 직접 올리는 것과는 무엇이 다를까요? 먼저 git clone을 통해 내려받은 Copy Repo의 원격 저장소는 아직 Origin Repo입니다. (.git 파일에 정의되어있습니다) 그래서 코드를 수정하고 push를 하면 Origin Repo 저장소로 push 요청을 하게되고 권한이 없게되면 push 행위를 실패하게 될 것 입니다. 그럼 gitconfig의 remote 주..

DevOps/Git 2022.06.15

[Git] Better Pull Request for GitHub

큰 규모의 프로젝트에서 개발자간 협업은 필수요소입니다. 그렇기에 코드리뷰의 중요성이 점점 더 높아지고 있는 것 같은데요. Github의 웹페이지에서 다른 개발자가 작성한 Pull Request를 확인하는게 쉽지 않죠. 그래서 Github 페이지에서 Pull Request의 코드 변경사항을 쉽게 파악할 수 있게 도와주는 크롬 확장 프로그램 Better Pull Request for GitHub를 소개하려 합니다. 설치는 매우 간단합니다. 아래 페이지에서 크롬 확장 프로그램을 추가하면 됩니다. https://chrome.google.com/webstore/detail/better-pull-request-for-g/nfhdjopbhlggibjlimhdbogflgmbiahc Better Pull Request ..

DevOps/Git 2022.06.14

[MacOS] iTerm

iTerm은 다양한 기능을 담고 있는 터미널 애플리케이션입니다. https://iterm2.com/ iTerm2 - macOS Terminal Replacement iTerm2 by George Nachman. Website by Matthew Freeman, George Nachman, and James A. Rosen. Website updated and optimized by HexBrain iterm2.com Status Bar Status Bar는 Terminal에서 디바이스의 다양한 상태값을 볼 수 있도록 도와주는 설정입니다. 들어가는 순서는 좌상단 iTerm2 > Preferences... 메뉴로 들어가 Profile > Session > Status bar enabled를 활성화 해주면 됩..

DevOps/MacOS 2022.06.14

[MacOS] oh my ZSH

https://ohmyz.sh/ Oh My Zsh - a delightful & open source framework for Zsh Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with several helpful functions, helpers, plugins, themes, and a few things that make you shout... OH MY ZSH! ohmyz.sh Unleash your terminal like never before! 이전과는 다른 방식으로 터미널을 활용하세요. 홈페이지의 슬로건처럼 oh my ..

DevOps/MacOS 2022.06.13