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?

エイリアスを使ってコマンドを省略しよう!

Posted at

今回やりたいこと

git clone https://github.com/hoge/hoge.git

このgit cloneの部分を毎回打つのは面倒くさい。

こんなときに使えるのがエイリアス。

以下のコマンドを実行してみてください。
(コピペOK)

echo 'alias gc="git clone"' >> ~/.zshrc
source ~/.zshrc

これで一度ターミナルを再起動し

gc https://github.com/hoge/hoge.git

とコマンドを叩くと・・・

これでgit cloneコマンドを実行しアプリをクローンすることができました!!✨️

便利なので他にもコマンド随時追加していく予定です!

便利すぎる😭

git clone = gc

echo 'alias gc="git clone"' >> ~/.zshrc
source ~/.zshrc

docker compose = dc

echo 'alias dc="docker compose"' >> ~/.zshrc
source ~/.zshrc
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?