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?

【git-spice】直近のコミットに変更を追加する方法

Posted at

追加方法

gs commit amendを使用して直近のコミットに変更を追加できます。

コマンド構文

gs commit amend [flags]
# または短縮形
gs c a [flags]

基本的な使用例

# ファイルを修正してステージ
git add modified_file.py

# コミットを修正(上位ブランチも自動で再スタック)
gs commit amend

-a, --all

コミット前にすべての変更を自動的にステージします。

# 修正したファイルを自動でステージしてからamend
gs commit amend -a

-m, --message=MSG

コミットメッセージを指定します。エディタを開くことなく、直接メッセージを設定できます。

gs commit amend -m "修正: バグを修正しユーザビリティを改善"

--no-edit

コミットメッセージを編集せず、既存のメッセージをそのまま使用します。

# メッセージはそのままで、変更内容だけを追加
gs commit amend --no-edit

参考

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?