計算機科学のブログ

ほしい物リスト

Git - Making your life Easier with Git: Pro Tips - gitignore, operating system(macOS)

Head First Git: A Learner’s Guide to Understanding Git from the Inside OutRaju Gandhi(著)、 O’Reilly Mediaの Chapter 8.(Making your life Easier with Git: Pro Tips)、SHARPEN YOUR PENCIL(654/715)の解答を求めてみる。

入出力結果(Terminal, Zsh)

% cd a-head-above 
% touch .gitignore
% code .
% git add .gitignore 
% git s
On branch master
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	new file:   .gitignore

% git commit -m 'chore: add .gitignore file'
[master cf1ba5b] chore: add .gitignore file
 1 file changed, 47 insertions(+)
 create mode 100644 .gitignore
%