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.

gitオリジナルコマンド作成【初心者向け】

0
Posted at

オリジナルコマンド作成

gitでの時短コマンドを作成しました。

/usr/bin など、適当にパスが通っているディレクトリで以下のファイルを作成します。

chmod +x で実行権限を与える必要があります。

gam

# !/bin/bash
if [[ $1 = "" ]]; then # 引数がない場合
  echo "Error : Requires an argument" 1>&2
  exit 2
else
 git add --all
 git commit -m"{$1}"
fi

image.png

gao

# !/bin/bash
if [[ $1 = "" ]]; then # 引数がない場合
  echo "Error : Requires an argument" 1>&2
  exit 2
else
git push origin $1
fi

image.png

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?