Skip to content

Instantly share code, notes, and snippets.

@devheedoo
Created July 3, 2020 02:23
Show Gist options
  • Save devheedoo/4b6c271e0ef3de7aa19a10ffc5f57178 to your computer and use it in GitHub Desktop.
Save devheedoo/4b6c271e0ef3de7aa19a10ffc5f57178 to your computer and use it in GitHub Desktop.
Gists while working

Gists

Temp

  • connect to media_dev: $ ssh -i ~/Downloads/blend_keypair.pem ubuntu@15.164.44.190
  • clean yarn cache: $ yarn cache clean
  • check connected android device: $ adb devices
  • build & run RN android on release version: $ react-native run-android --variant=release

Git

  • edit recent commit: $ git commit --amend

  • revert recent commit: $ git reset HEAD~1 --soft

  • push with tags: $ git push --tags

  • stash with name: $ git stash push -m <title>

  • rename local branch: $ git branch -m <old_name> <new_name>

  • update remove branch: $ git remote prune origin

  • remove pushed commits (DEVIL's SKILL):

    $ git reset -hard [COMMIT ID or HEAD~number]
    $ git clean -f -d
    $ git push -f
  • sync tags with remote

    $ git tag -l | xargs git tag -d
    $ git fetch --tags
  • list not pushed branches: $ git log --branches --not --remotes

  • show git logs before specific tag: $ git log <tag_name>

  • delete all merged local branches: $ git branch | grep -v "master" | xargs git branch -D

Commit message

  • feat: 새로운 기능을 추가할 경우
  • fix: 버그를 고친 경우
  • docs: 문서 수정한 경우
  • style: 코드 포맷 변경, 세미 콜론 누락, 코드 수정이 없는 경우
  • refactor: 프로덕션 코드 리팩토링
  • test: 테스트 추가, 테스트 리팩토링 (프로덕션 코드 변경 없음)
  • chore: 빌드 테스크 업데이트, 패키지 매니저 설정할 경우 (프로덕션 코드 변경 없음)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment