Git - GitHub - Collaborating with Git - Ⅱ: Go, Team, Go! - fetch, switch, merge, 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 - Ⅱ: Go, Team, Go!)、SHARPeN YOUR PENCIL(485/680)の解答を求めてみる。
入出力結果(Terminal, Zsh)
ch6 % cd sangitas-clone
sangitas-clone % git status
On branch addison-add-faqs
Your branch is up to date with 'origin/addison-add-faqs'.
nothing to commit, working tree clean
sangitas-clone % git branch
* addison-add-faqs
master
sangita-add-profile
sangitas-clone % git branch -a
* addison-add-faqs
master
sangita-add-profile
remotes/origin/HEAD -> origin/master
remotes/origin/addison-add-faqs
remotes/origin/master
remotes/origin/sangita-add-profile
sangitas-clone % git fetch
remote: Enumerating objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 3 (from 2)
Unpacking objects: 100% (3/3), 465 bytes | 232.00 KiB/s, done.
From https://github.com/kamimura/hawtdawg-all-ears
2350fc1..a055631 sangita-add-profile -> origin/sangita-add-profile
sangitas-clone % git branch -a
* addison-add-faqs
master
sangita-add-profile
remotes/origin/HEAD -> origin/master
remotes/origin/addison-add-faqs
remotes/origin/master
remotes/origin/sangita-add-profile
sangitas-clone % git switch sangita-add-profile
Switched to branch 'sangita-add-profile'
Your branch is behind 'origin/sangita-add-profile' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
sangitas-clone % git branch -a
addison-add-faqs
master
* sangita-add-profile
remotes/origin/HEAD -> origin/master
remotes/origin/addison-add-faqs
remotes/origin/master
remotes/origin/sangita-add-profile
sangitas-clone % git status
On branch sangita-add-profile
Your branch is behind 'origin/sangita-add-profile' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working tree clean
sangitas-clone % git merge origin/sangita-add-profile
Updating 2350fc1..a055631
Fast-forward
Profile.md | 2 ++
1 file changed, 2 insertions(+)
sangitas-clone % git status
On branch sangita-add-profile
Your branch is up to date with 'origin/sangita-add-profile'.
nothing to commit, working tree clean
sangitas-clone % git log --oneline
a055631 (HEAD -> sangita-add-profile, origin/sangita-add-profile) update profile
2350fc1 add sample profile
b278f04 (origin/master, origin/HEAD, master) addison's first commit
32b1d92 add README
% git status
On branch sangita-add-profile
Your branch is up to date with 'origin/sangita-add-profile'.
nothing to commit, working tree clean
sangitas-clone %