画布 1
git fetch & git push & git pull
  git fetch
    git fetch
      当前分支设置了upstream
        = git fetch [远程仓库名]
          upstream中remote信息
      当前分支没有设置upstream
        存在远程仓库origin，获取origin所有新增信息
          $ git fetch
remote: Counting objects: 5, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From /home/jeremy/git/gittest/fetch
b45812d..1369ca1 master -> origin/master
        不存在远程仓库origin，报错
          $ git fetch
fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched.
    git fetch [远程仓库名]
      获取远程仓库下的所有新增信息添加到对应的远程跟踪分支下
        远程跟踪分支即remote/origin01/*
        $ git fetch origin01
From /home/jeremy/git/gittest/fetch
d7c5bb8..bf7e346 master -> origin01/master
    git fetch [远程仓库名] [远程分支名]
      会将远程仓库origin下master的信息，更新到FETCH_HEAD
        执行一次fetch命令，FETCH_HEAD则会刷新一次
        $ git fetch origin br03
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From /home/jeremy/git/gittest/fetch
* branch br03 -> FETCH_HEAD
    git fetch [远程仓库名] [远程分支名]:[本地分支名]
      本地分支名不存在
        创建新分支进行更新
          $ git fetch origin master:other-master
From /home/jeremy/git/gittest/fetch
* [new branch] master -> other-master
      本地分支名存在，报错
        本地分支是master
          $ git fetch origin01 master:master
fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository
fatal: The remote end hung up unexpectedly
        本地分支非master
          $ git fetch origin01 master:br01
From /home/jeremy/git/gittest/fetch
! [rejected] master -> br01 (non-fast-forward)
  git push
    git push [远程仓库名] [本地分支名]:[远程分支名]
      $ git push origin br01:br01-remote
Counting objects: 7, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (6/6), 489 bytes | 0 bytes/s, done.
Total 6 (delta 0), reused 0 (delta 0)
To /home/jeremy/git/gittest/fetch.git/
* [new branch] br01 -> br01-remote
        推送本地br01分支到origin的br01-remote分支
    git push [远程仓库名] [本地分支名]
      $ git push origin br03
Counting objects: 4, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 256 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To /home/jeremy/git/gittest/fetch.git/
* [new branch] br03 -> br03
        推送本地br03分支到origin的br03分支
    git push [远程仓库名]
      当前分支设置了upstream
        远程分支名称与本地分支名称相同
          $ git push origin
Counting objects: 5, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 261 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To /home/jeremy/git/gittest/fetch.git/
e165f82..b0fc293 br03 -> br03
        远程分支名称与本地分支名称不同，报错
          $ git push origin
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push origin01 HEAD:br01-remote
To push to the branch of the same name on the remote, use
git push origin01 br01
            本地分支br01的远程分支为br01-remote
      当前分支没有设置upstream，报错
        $ git push origin
fatal: The current branch br01 has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin br01
    git push
      = git push [远程仓库名]
        upstream中remote信息
  git pull
    = git fetch + git merge
    git pull [远程仓库名] [远程分支名]:[本地分支名]
      git pull origin br01-remote:temp
        = git fetch orogin br01-remote:temp
+ get merge temp 合并到当前所在分支
          temp分支并未自动删除
    git pull [远程仓库名] [远程分支名]
      git pull origin br01-remote
        = git fetch origin br01-remote
+ get merge FETCH_HEAD 合并到当前所在分支
    git pull [远程仓库名]
      当前分支设置了upstream
        git pull origin02
          = git fetch origin02
+ git merge origin02/br01-remote
            $ git pull origin02
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From /home/jeremy/git/gittest/fetch
b12f57e..6c49a5a br01-remote -> origin02/br01-remote
Updating b12f57e..6c49a5a
Fast-forward
02.txt | 1 +
1 file changed, 1 insertion(+)
              upstream的merge信息进行merge
      当前分支没有设置upstream，报错
        $ git pull origin02
You asked to pull from the remote 'origin02', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.
    git pull
      当前分支设置了upstream
        = git pull [远程仓库名]
          upstream中remote信息
      当前分支没有设置upstream，报错
        存在远程仓库origin
          = git fetch origin
+ git merge ??
            $ git pull
remote: Counting objects: 5, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From /home/jeremy/git/gittest/fetch
31cd503..04a6837 master -> origin/master
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=<remote>/<branch> br02
              git fetch 成功，但merge报错
        没有origin
          = git fetch ??
+ git merge ??
            $ git pull
fatal: No remote repository specified. Please, specify either a URL or a
remote name from which new revisions should be fetched.
              git fetch 直接报错