【发布时间】:2019-07-18 13:16:28
【问题描述】:
- 所以我在 git 存储库上运行了
$ git pull命令。 - 它会输出我感兴趣的有用细节,以及许多我不关心的其他细节。
- 那么是否有一些开关或选项可以只保留我需要的详细信息?
$ git pull
我需要这个信息:
remote: Enumerating objects: 2866, done.
remote: Counting objects: 100% (2866/2866), done.
remote: Total 4840 (delta 2865), reused 2865 (delta 2865), pack-reused 1974
Receiving objects: 100% (4840/4840), 7.51 MiB | 2.98 MiB/s, done.
Resolving deltas: 100% (3810/3810), completed with 531 local objects.
From https://github.com/erlang/otp
76da23bb4e..6053c0e4d7 master -> origin/master
77cff66931..39968f062e maint -> origin/maint
934f9974eb..f30b1052c7 maint-21 -> origin/maint-21
* [new tag] OTP-21.2.6 -> OTP-21.2.6
* [new tag] OTP-20.3.2.1 -> OTP-20.3.2.1
Updating 76da23bb4e..6053c0e4d7
我不需要这些信息:
Fast-forward
.gitignore | 3 +
bootstrap/bin/no_dot_erlang.boot | Bin 6539 -> 6541 bytes
bootstrap/bin/start.boot | Bin 6539 -> 6541 bytes
bootstrap/bin/start_clean.boot | Bin 6539 -> 6541 bytes
bootstrap/lib/compiler/ebin/beam_a.beam | Bin 3364 -> 3200 bytes
bootstrap/lib/compiler/ebin/beam_asm.beam | Bin 11040 -> 10996 bytes
bootstrap/lib/compiler/ebin/beam_block.beam | Bin 3460 -> 3444 bytes
bootstrap/lib/compiler/ebin/beam_disasm.beam | Bin 20864 -> 20860 bytes
bootstrap/lib/compiler/ebin/beam_except.beam | Bin 4252 -> 4228 bytes
bootstrap/lib/compiler/ebin/beam_jump.beam | Bin 10024 -> 9988 bytes
.../lib/compiler/ebin/beam_kernel_to_ssa.beam | Bin 29484 -> 28880 bytes
bootstrap/lib/compiler/ebin/beam_peep.beam | Bin 3644 -> 3604 bytes
bootstrap/lib/compiler/ebin/beam_ssa.beam | Bin 12208 -> 12176 bytes
bootstrap/lib/compiler/ebin/beam_ssa_bsm.beam | Bin 18176 -> 17952 bytes
bootstrap/lib/compiler/ebin/beam_ssa_codegen.beam | Bin 37824 -> 37708 bytes
bootstrap/lib/compiler/ebin/beam_ssa_dead.beam | Bin 12128 -> 11876 bytes
bootstrap/lib/compiler/ebin/beam_ssa_lint.beam | Bin 7512 -> 7536 bytes
etc...
那么我该怎么做呢?
【问题讨论】:
-
第一部分(你说你需要)基本上是来自
git pull的“获取”部分的输出。因此,您可以使用git fetch后跟git pull >/dev/null来接近您想要的结果