前言
git fetch
命令用于从远程获取代码库,从远端仓库提取数据并尝试合并到当前分支
用法
1、git fetch
git fetch origin
会显示
$ git fetch origin
remote: Enumerating objects: 116, done.
remote: Counting objects: 100% (93/93), done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 62 (delta 28), reused 0 (delta 0)
Unpacking objects: 100% (62/62), done.
From http://github.comi:000/scm/adapt/cm
d289cd3..360765e feature_conformer-large -> origin/feature
a72e376..43d0252 feature_yolov5 -> origin/feature_
b45e6db..9d4636b master -> origin/master
以上信息"b45e6db…9d4636b master -> origin/master" 说明 master 分支已被更新,我们可以使用以下命令将更新同步到本地:
2、git merge
git merge origin/master
展示
$ git merge origin/master
Updating d289cd3..9d4636b
Fast-forward
training/resnet/pytorch/train.py | 71 +++++++++-
1 files changed, 290 insertions(+), 148 deletions(-)
create mode 100644 t/pytorch/scripts/test_dali.sh