計算機科学のブログ

ほしい物リスト

Git - Making your life Easier with Git: Pro Tips - branch names

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)、EXERCISE(641/680)の解答を求めてみる。

入出力結果(Terminal, Zsh)

% mkdir tmp
% cd tmp 
% git initt
git: 'initt' is not a git command. See 'git --help'.

The most similar command is
	init
% git init
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
Initialized empty Git repository in /Users/.../tmp/.git/
% tounch test.txt
zsh: command not found: tounch
% touch test.txt
% git add .
% git c -m 'first commit'
[master (root-commit) 3d989f0] first commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 test.txt
% git branch k/6283/allow-user-to-export-report-in-html-format
% git b k/70/reformat-tables
% git b k/2718/allow-multiple-photos
% git b
  k/2718/allow-multiple-photos
  k/6283/allow-user-to-export-report-in-html-format
  k/70/reformat-tables
* master
% git b -m k/6283/allow-user-to-export-report-in-html-format k/6283/allow-user-to-export-report                
% git b
  k/2718/allow-multiple-photos
  k/6283/allow-user-to-export-report
  k/70/reformat-tables
* master
%