0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

コマンドチートシート(自分用)

Last updated at Posted at 2021-10-24

コマンド集

Git

  • remoteブランチを参照
    git remote show origin

  • remoteブランチで削除済&ローカルに参照が残っているブランチを表示
    git remote prune --dry-run origin

  • remote削除済ブランチのローカル参照を削除
    git remote prune origin

  • remoteブランチの参照を削除
    git branch --unset-upstream

  • ローカルブランチとリモートブランチを紐づける
    git branch --set-upstream-to=origin/ブランチ名
    もしくは
    git branch -u origin ブランチ名

  • 紐づいてるブランチの確認
    git branch -vv

  • カレントディレクトリ以下を指定コミット番号の状態に復元する
    git restore -s [コミット番号]

  • カレントディレクトリ以下を一括リセット
    git restore .

  • untracked fileを削除前に確認
    git clean -n

  • untracked fileを削除
    git clean -f

  • ブランチ派生元変更(リベース)
    git rebase [派生元] [派生先]

Docker

  • ボリューム確認
    docker volume ls

  • ストレージ確認
    docker system df

  • ビルドキャッシュ削除
    docker builder prune

  • コンテナプロセス確認
    docker top

  • ローカルからコンテナへコピー
    docker cp [ファイル] [コンテナID]:/

  • コンテナからローカルへコピー
    docker cp [コンテナID]:/[ファイル] ./

Docker-compose

  • ビルドと立ち上げ
    docker-compose up -d

  • コンテナ終了と削除
    docker-compose down

  • 全削除(コンテナ、イメージ、ボリューム)
    docker-compose down --rmi all --volumes --remove-orphans

  • コンテナスタート
    docker-compose start

  • コンテナ終了
    docker-compose stop

  • コンテナに入る
    docker-compose exec [コンテナ名] bash

  • 情報
    docker-compose ps

Vue-cli

  • コンテナ内でプロジェクト生成
    vue create -n --merge [プロジェクト名]

その他

随時更新予定

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?