Skip to content

Instantly share code, notes, and snippets.

@ljlm0402
Last active August 19, 2020 01:37
Show Gist options
  • Save ljlm0402/4d9d42810c1e86b8adc8e9d8a3f4b78a to your computer and use it in GitHub Desktop.
Save ljlm0402/4d9d42810c1e86b8adc8e9d8a3f4b78a to your computer and use it in GitHub Desktop.
명령어 리스트 (docker, github, npm)

docker-compose

docker-compose up : 실행 / docker-compose up -d : 백그라운드 실행

docker-compose -f [docker-compose.yml(파일명)] up -d : 해당 파일 실행

docker ps : 현재 구동 확인

docker-compose down : 종료

github

  • push
    • git push -u origin [ branch name ]

  • pull

    • git pull
  • 강제로

    • git reset --hard HEAD
    • git pull

  • merge
    • git merge [branch name]

  • clone
    • git clone -b [branch name] [github url]

  • remote
    • git remote remove origin
    • git remote add origin [github url]
    • git add . (commit data router)
    • git commit -m "message"
    • git commit --allow-empty // 빈 커밋을 생성하는 옵션이다
    • git push -u origin master (--force)

  • branch
    • git branch
    • git branch [new branch name]
    • git branch -m [old branch name] [new branch name]

  • mv
  • git mv -f [변경전] [변경후]

  • checkout
    • git checkout [branch name]
    • git checkout -b [new branch name]

  • log
    • git log

  • .gitignore cache clear
    • git rm -r --cached .
    • git add .
    • git commit -m "message"
    • git push ~

  • commit 취소
    • commit을 취소하고 해당 파일들은 staged 상태로 워킹 디렉터리에 보존
      • git reset --soft HEAD^
    • commit을 취소하고 해당 파일들은 unstaged 상태로 워킹 디렉터리에서 삭제
      • git reset --hard HEAD^

npm

npm run [script_name] : package.json 파일에서 해당하는 스크립트문 실행

npm ls -g --depth=0 : 전역 패키지 설치 목록 확인

npm outdated : 오래된 패키지 알려줌

npm update : 설치한 패키지를 업데이트

npm dedupe : npm의 중복된 패키지들을 정리

npm update -g --verbose : 버전 업데이트 및

npm info [npm_name] : npm 배포

npm publish : npm 패키지 배포

npm unpublish @ : 특정 버전 삭제

npm unpublish --force : 전체삭제

npm install [package-name] --sass-binary-path="경로" : 절대 경로로 releases 파일 직접 binding.node 설치

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment