Git - GitHub - Collaborating with Git - Part Ⅱ: Go, Team Go! - branch command, flag
Head First Git: A Learner’s Guide to Understanding Git from the Inside Out、 Raju Gandhi(著)、 O’Reilly Mediaの Chapter 6.(Collaborating with Git - Part Ⅱ: Go, Team Go!)、SHARPEN YOUR PENCIL(496/715)の解答を求めてみる。
入出力結果(Terminal, Zsh)
% git branch
master
* sangita-add-profile
% git branch -a
master
* sangita-add-profile
remotes/origin/HEAD -> origin/master
remotes/origin/addison-add-faqs
remotes/origin/master
remotes/origin/sangita-add-profile
% git switch addison-add-faqs
branch 'addison-add-faqs' set up to track 'origin/addison-add-faqs'.
Switched to a new branch 'addison-add-faqs'
% git branch -vv
* addison-add-faqs 1a691fb [origin/addison-add-faqs] add second FAQ
master 275d4d6 [origin/master] addison's first commit
sangita-add-profile 551184c [origin/sangita-add-profile] add sample profile
% cp ../../headfirst-git-samples/chapter06/FAQ-3.md FAQ.md
% git status
On branch addison-add-faqs
Your branch is up to date with 'origin/addison-add-faqs'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: FAQ.md
no changes added to commit (use "git add" and/or "git commit -a")
% git add FAQ.md
% git commit -m 'add third FAQ'
[addison-add-faqs 5dc2037] add third FAQ
1 file changed, 6 insertions(+)
% git status
On branch addison-add-faqs
Your branch is ahead of 'origin/addison-add-faqs' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
% git log --oneline --all --graph
* 5dc2037 (HEAD -> addison-add-faqs) add third FAQ
* 1a691fb (origin/addison-add-faqs) add second FAQ
| * 551184c (origin/sangita-add-profile, sangita-add-profile) add sample profile
|/
* 275d4d6 (origin/master, origin/HEAD, master) addison's first commit
* 32b1d92 add README
% git diff HEAD~1
diff --git a/FAQ.md b/FAQ.md
index cc5c3ed..2181c0b 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -11,3 +11,9 @@ Showcase your best self—whether that means a fresh-from-the-groomer glamour sh
Open the Hawt Dawg app and click on "Edit Profile."
Scroll down to the section called "Passions" and tell potential mates and friends all about the treats and toys that make your tail wag.
When you’re done, click “Save Changes” to show the world.
+
+## Photos are nice and all, but I don’t see very well. How can I smell the other dogs?
+
+We regret that we are unable to offer our customers smell-o-vision at this time.
+As soon as human technology catches up to dog noses, we’ll be sure to add a scent feature to the app.
+In the meantime, why not meet up at the dog park to get a whiff of your new friend?
%