Git - GitHub - Collaborating with Git - Part Ⅱ: Go, Team Go! - branch, switch, remote
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(495/715)の解答を求めてみる。
入出力結果(Terminal, Zsh)
% git branch
* addison-add-faqs
master
% git branch -a
* addison-add-faqs
master
remotes/origin/HEAD -> origin/master
remotes/origin/addison-add-faqs
remotes/origin/master
remotes/origin/sangita-add-profile
% git status
On branch addison-add-faqs
Your branch is up to date with 'origin/addison-add-faqs'.
nothing to commit, working tree clean
% git switch sangita-add-profile
branch 'sangita-add-profile' set up to track 'origin/sangita-add-profile'.
Switched to a new branch 'sangita-add-profile'
% git branch
addison-add-faqs
master
* sangita-add-profile
% 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/Profile-2.md Profile.md
% git add Profile.md
% git status
On branch sangita-add-profile
Your branch is up to date with 'origin/sangita-add-profile'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: Profile.md
% git commit -m 'update profile'
[sangita-add-profile c43a03d] update profile
1 file changed, 2 insertions(+)
% git status
On branch sangita-add-profile
Your branch is ahead of 'origin/sangita-add-profile' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
% git log --all --oneline --graph
* c43a03d (HEAD -> sangita-add-profile) update profile
* 551184c (origin/sangita-add-profile) add sample profile
| * 1a691fb (origin/addison-add-faqs, addison-add-faqs) add second FAQ
|/
* 275d4d6 (origin/master, origin/HEAD, master) addison's first commit
* 32b1d92 add README
% git diff HEAD~1
diff --git a/Profile.md b/Profile.md
index 6f4eda3..7901f7f 100644
--- a/Profile.md
+++ b/Profile.md
@@ -7,3 +7,5 @@ Age: **3**
Breed: **Beagle**
Location: **Philadelphia**
+
+Skills: Following scent trails, digging holes, treeing squirrels, looking after small children, guarding the pack, stealing chimkin when the little humans isn't looking
%