計算機科学のブログ

ほしい物リスト

Git - GitHub - Collaborating with Git - Part Ⅱ: Go, Team Go! - subcomands, fetch, merge

Head First Git: A Learner’s Guide to Understanding Git from the Inside OutRaju Gandhi(著)、 O’Reilly Mediaの Chapter 6.(Collaborating with Git - Part Ⅱ: Go, Team Go!)、SHARPEN YOUR PENCIL(512/715)の解答を求めてみる。

入出力結果(Terminal, Zsh)

% 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 branch
* addison-add-faqs
  master
  sangita-add-profile
% git fetch
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (3/3), 463 bytes | 154.00 KiB/s, done.
From https://github.com/kamimura/hawtdawg-all-ears
   551184c..c43a03d  sangita-add-profile -> origin/sangita-add-profile
% 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)
% 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
% git merge origin/sangita-add-profile
Updating 551184c..c43a03d
Fast-forward
 Profile.md | 2 ++
 1 file changed, 2 insertions(+)
% git status
On branch sangita-add-profile
Your branch is up to date with 'origin/sangita-add-profile'.

nothing to commit, working tree clean
% git push
Everything up-to-date
%