0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

addをファイル・差分単位で操作したいときの技

Posted at

ローカルだけで変更を保存しておきたいファイル・差分があるときに使えるのではと思う。

ファイル単位でaddしたい時

$ git add <filePath>

差分単位でaddしたい時

まずはこれを実行。

$ git add -p <filePath>

すると、こちらの記事のように、差分単位でaddするかどうか聞いてくれる。
https://qiita.com/miyohide/items/79ab0ff3b3852289a6be
それを1つ1つy(yes)やn(no)で答えるだけ。
すべて答え終わったら、自動的にこの質問モードから抜けられる。

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?