天天看點

QUIC建構1——chromium鏡像,clone檔案depot_tools的過程+git過程中的問題問題1問題2問題3:擷取chromium源碼

問題1

(1)安裝depot_tool逾時,的問題,尋找鏡像

(2)鏡像:

https://source.codeaurora.org/quic/lc/chromium/tools/depot_tools

問題2

(1)git中的連結替換

問題:warning: 遠端 HEAD 指向一個不存在的引用,無法檢出。

檔案下是空白的,于是cd 到對應的depot_tools檔案下,做了下面的操作,參考連結進行解決;

https://blog.csdn.net/williamvon/article/details/71421810

個人了解:有好幾個branch,需要從中checkout一個分支,并建立分支進行儲存,即可解決。

[email protected]-VirtualBox:~/opt$ git clone https://source.codeaurora.org/quic/lc/chromium/tools/depot_tools.git
正克隆到 'depot_tools'...
remote: Enumerating objects: 360, done.
remote: Counting objects: 100% (360/360), done.
remote: Compressing objects: 100% (359/359), done.
remote: Total 46571 (delta 254), reused 0 (delta 0), pack-reused 46211
接收對象中: 100% (46571/46571), 22.03 MiB | 2.45 MiB/s, 完成.
處理 delta 中: 100% (34888/34888), 完成.
檢查連接配接... 完成。
warning: 遠端 HEAD 指向一個不存在的引用,無法檢出。

[email protected]-VirtualBox:~/opt$ git show-ref
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
[email protected]-VirtualBox:~/opt$ cd ~
[email protected]-VirtualBox:~$ git show-ref
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
[email protected]-VirtualBox:~$ cd opt/depot_tools/
[email protected]-VirtualBox:~/opt/depot_tools$ git show-ref
57ed3aedaef3e9eabf9d8ea19f99ebbe8925b7be refs/remotes/origin/chromium.org/chrome/3865
9c96f7437ed546a93ba8b405d47265e50f1ca31c refs/remotes/origin/chromium.org/chrome/3904
5316f2b377a2c66279abaf35bc3f5971e4852ee4 refs/remotes/origin/chromium.org/chrome/3987
af45aa86aced54e87d3a5f061b504fd486694a27 refs/remotes/origin/chromium.org/chrome/4147
0b92d49c8c3e90e988288a63ea11dc2860387845 refs/remotes/origin/chromium.org/infra/config
f35d3508ebd8c98d6c3b6ebfebe4895b374dbc07 refs/remotes/origin/chromium.org/main
a6baf70a45b04731ed99f47a0fbfcb5f28a1f03e refs/remotes/origin/chromium.org/master
[email protected]-VirtualBox:~/opt/depot_tools$ git branch
[email protected]-VirtualBox:~/opt/depot_tools$ git branch -a
  remotes/origin/chromium.org/chrome/3865
  remotes/origin/chromium.org/chrome/3904
  remotes/origin/chromium.org/chrome/3987
  remotes/origin/chromium.org/chrome/4147
  remotes/origin/chromium.org/infra/config
  remotes/origin/chromium.org/main
  remotes/origin/chromium.org/master
[email protected]-VirtualBox:~/opt/depot_tools$ git checkout remotes/origin/chromium.org/chrome/3865
Note: checking out 'remotes/origin/chromium.org/chrome/3865'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD 目前位于 57ed3ae... Run git_cl commands as a python step.
[email protected]-VirtualBox:~/opt/depot_tools$ ll
總用量 3124
drwxrwxr-x 15 larry larry  12288 9月  27 18:13 ./
drwxrwxrwx  7 larry larry   4096 9月  27 17:40 ../
-rwxrwxr-x  1 larry larry   2523 9月  27 18:13 annotated_gclient.py*
-rw-rw-r--  1 larry larry    685 9月  27 18:13 appengine_mapper.py
-rw-rw-r--  1 larry larry  31505 9月  27 18:13 auth.py
-rwxrwxr-x  1 larry larry   1140 9月  27 18:13 autoninja*
-rwxrwxr-x  1 larry larry   1464 9月  27 18:13 autoninja.bat*
-rwxrwxr-x  1 larry larry   5202 9月  27 18:13 autoninja.py*
-rwxrwxr-x  1 larry larry    320 9月  27 18:13 bb*
-rw-rw-r--  1 larry larry    247 9月  27 18:13 bb.bat
drwxrwxr-x  3 larry larry   4096 9月  27 18:13 bootstrap/
-rw-rw-r--  1 larry larry    485 9月  27 18:13 breakpad.py
-rwxrwxr-x  1 larry larry   4615 9月  27 18:13 buildbucket.py*
lrwxrwxrwx  1 larry larry     24 9月  27 18:13 cbuildbot -> support/chromite_wrapper*
-rw-rw-r--  1 larry larry  15128 9月  27 18:13 checkout.py
lrwxrwxrwx  1 larry larry     24 9月  27 18:13 chrome_set_ver -> support/chromite_wrapper*
-rwxrwxr-x  1 larry larry   6589 9月  27 18:13 cipd*
-rw-rw-r--  1 larry larry   1803 9月  27 18:13 cipd.bat
-rw-rw-r--  1 larry larry    288 9月  27 18:13 cipd_bin_setup.bat
-rw-rw-r--  1 larry larry    611 9月  27 18:13 cipd_bin_setup.sh
-rw-rw-r--  1 larry larry     54 9月  27 18:13 cipd_client_version
-rw-rw-r--  1 larry larry   1424 9月  27 18:13 cipd_client_version.digests
-rw-rw-r--  1 larry larry   1823 9月  27 18:13 cipd_manifest.txt
-rw-rw-r--  1 larry larry  10811 9月  27 18:13 cipd_manifest.versions
-rw-rw-r--  1 larry larry   4010 9月  27 18:13 cipd.ps1
-rwxrwxr-x  1 larry larry    275 9月  27 18:13 cit*
-rwxrwxr-x  1 larry larry    410 9月  27 18:13 cit.bat*
-rwxrwxr-x  1 larry larry   5071 9月  27 18:13 cit.py*
-rwxrwxr-x  1 larry larry    280 9月  27 18:13 clang-format*
-rw-rw-r--  1 larry larry    415 9月  27 18:13 clang-format.bat
-rwxrwxr-x  1 larry larry    293 9月  27 18:13 clang_format_merge_driver*
-rwxrwxr-x  1 larry larry    428 9月  27 18:13 clang_format_merge_driver.bat*
-rwxrwxr-x  1 larry larry   2457 9月  27 18:13 clang_format_merge_driver.py*
-rwxrwxr-x  1 larry larry   2657 9月  27 18:13 clang_format.py*
-rw-rw-r--  1 larry larry    265 9月  27 18:13 codereview.settings
-rwxrwxr-x  1 larry larry    298 9月  27 18:13 compile_single_file*
-rw-rw-r--  1 larry larry    394 9月  27 18:13 compile_single_file.bat
-rw-rw-r--  1 larry larry   2732 9月  27 18:13 compile_single_file.py
-rw-rw-r--  1 larry larry    390 9月  27 18:13 cpplint.bat
-rwxrwxr-x  1 larry larry   2394 9月  27 18:13 cpplint_chromium.py*
-rwxrwxr-x  1 larry larry 235011 9月  27 18:13 cpplint.py*
lrwxrwxrwx  1 larry larry     24 9月  27 18:13 cros -> support/chromite_wrapper*
-rw-rw-r--  1 larry larry    145 9月  27 18:13 CROS_OWNERS
lrwxrwxrwx  1 larry larry     24 9月  27 18:13 cros_sdk -> support/chromite_wrapper*
-rwxrwxr-x  1 larry larry   1880 9月  27 18:13 dart_format.py*
-rwxrwxr-x  1 larry larry    284 9月  27 18:13 depot-tools-auth*
-rw-rw-r--  1 larry larry    419 9月  27 18:13 depot-tools-auth.bat
-rwxrwxr-x  1 larry larry   3322 9月  27 18:13 depot-tools-auth.py*
-rwxrwxr-x  1 larry larry   1702 9月  27 18:13 detect_host_arch.py*
-rwxrwxr-x  1 larry larry    300 9月  27 18:13 download_from_google_storage*
-rwxrwxr-x  1 larry larry    435 9月  27 18:13 download_from_google_storage.bat*
-rwxrwxr-x  1 larry larry  23640 9月  27 18:13 download_from_google_storage.py*
-rwxrwxr-x  1 larry larry   1176 9月  27 18:13 ensure_bootstrap*
-rwxrwxr-x  1 larry larry    277 9月  27 18:13 fetch*
-rwxrwxr-x  1 larry larry    531 9月  27 18:13 fetch.bat*
drwxrwxr-x  2 larry larry   4096 9月  27 18:13 fetch_configs/
-rwxrwxr-x  1 larry larry  10266 9月  27 18:13 fetch.py*
-rw-rw-r--  1 larry larry  11974 9月  27 18:13 fix_encoding.py
-rwxrwxr-x  1 larry larry    524 9月  27 18:13 gclient*
-rwxrwxr-x  1 larry larry    534 9月  27 18:13 gclient.bat*
-rwxrwxr-x  1 larry larry   2322 9月  27 18:13 gclient_completion.sh*
-rw-rw-r--  1 larry larry  32231 9月  27 18:13 gclient_eval.py
-rwxrwxr-x  1 larry larry   4179 9月  27 18:13 gclient-new-workdir.py*
-rw-rw-r--  1 larry larry   5050 9月  27 18:13 gclient_paths.py
-rwxrwxr-x  1 larry larry 119334 9月  27 18:13 gclient.py*
-rw-rw-r--  1 larry larry  61964 9月  27 18:13 gclient_scm.py
-rw-rw-r--  1 larry larry  39390 9月  27 18:13 gclient_utils.py
-rwxrwxr-x  1 larry larry   4643 9月  27 18:13 gerrit_client.py*
-rw-rw-r--  1 larry larry  36010 9月  27 18:13 gerrit_util.py
drwxrwxr-x  8 larry larry   4096 9月  27 18:13 .git/
-rw-rw-r--  1 larry larry   1548 9月  27 18:13 .gitattributes
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-cache*
-rwxrwxr-x  1 larry larry  30889 9月  27 18:13 git_cache.py*
-rwxrwxr-x  1 larry larry    217 9月  27 18:13 git-cl*
-rwxrwxr-x  1 larry larry    962 9月  27 18:13 git_cl_completion.sh*
-rwxrwxr-x  1 larry larry 220551 9月  27 18:13 git_cl.py*
-rw-rw-r--  1 larry larry  30073 9月  27 18:13 git_common.py
-rwxrwxr-x  1 larry larry   1730 9月  27 18:13 git-crrev-parse*
-rw-rw-r--  1 larry larry   1800 9月  27 18:13 git_dates.py
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-drover*
-rwxrwxr-x  1 larry larry  15533 9月  27 18:13 git_drover.py*
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-find-releases*
-rwxrwxr-x  1 larry larry   1956 9月  27 18:13 git_find_releases.py*
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-footers*
-rwxrwxr-x  1 larry larry   8451 9月  27 18:13 git_footers.py*
-rwxrwxr-x  1 larry larry    254 9月  27 18:13 git-freeze*
-rwxrwxr-x  1 larry larry    871 9月  27 18:13 git_freezer.py*
-rwxrwxr-x  1 larry larry    529 9月  27 18:13 git-gs*
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-hyper-blame*
-rwxrwxr-x  1 larry larry  12771 9月  27 18:13 git_hyper_blame.py*
-rw-rw-r--  1 larry larry   1674 9月  27 18:13 .gitignore
-rwxrwxr-x  1 larry larry    223 9月  27 18:13 git-map*
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-map-branches*
-rwxrwxr-x  1 larry larry  11323 9月  27 18:13 git_map_branches.py*
-rwxrwxr-x  1 larry larry   4357 9月  27 18:13 git_map.py*
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-mark-merge-base*
-rwxrwxr-x  1 larry larry   2059 9月  27 18:13 git_mark_merge_base.py*
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-nav-downstream*
-rwxrwxr-x  1 larry larry   1935 9月  27 18:13 git_nav_downstream.py*
-rwxrwxr-x  1 larry larry    236 9月  27 18:13 git-nav-upstream*
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-new-branch*
-rwxrwxr-x  1 larry larry   2837 9月  27 18:13 git_new_branch.py*
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-number*
-rwxrwxr-x  1 larry larry   9308 9月  27 18:13 git_number.py*
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-rebase-update*
-rwxrwxr-x  1 larry larry  12176 9月  27 18:13 git_rebase_update.py*
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-rename-branch*
-rwxrwxr-x  1 larry larry   1639 9月  27 18:13 git_rename_branch.py*
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-reparent-branch*
-rwxrwxr-x  1 larry larry   3229 9月  27 18:13 git_reparent_branch.py*
-rwxrwxr-x  1 larry larry    251 9月  27 18:13 git-retry*
-rwxrwxr-x  1 larry larry   5795 9月  27 18:13 git_retry.py*
-rwxrwxr-x  1 larry larry    610 9月  27 18:13 git-runhooks*
-rwxrwxr-x  1 larry larry    213 9月  27 18:13 git-squash-branch*
-rwxrwxr-x  1 larry larry    748 9月  27 18:13 git_squash_branch.py*
drwxrwxr-x  4 larry larry   4096 9月  27 18:13 git-templates/
-rwxrwxr-x  1 larry larry    502 9月  27 18:13 git-thaw*
-rwxrwxr-x  1 larry larry    304 9月  27 18:13 git-upstream-diff*
-rwxrwxr-x  1 larry larry   2044 9月  27 18:13 git_upstream_diff.py*
-rwxrwxr-x  1 larry larry    270 9月  27 18:13 gn*
-rw-rw-r--  1 larry larry    405 9月  27 18:13 gn.bat
-rwxrwxr-x  1 larry larry   2991 9月  27 18:13 gn.py*
-rwxrwxr-x  1 larry larry   5569 9月  27 18:13 gsutil.py*
-rwxrwxr-x  1 larry larry    532 9月  27 18:13 gsutil.py.bat*
-rw-rw-r--  1 larry larry   2477 9月  27 18:13 gsutil.vpython
drwxrwxr-x  3 larry larry   4096 9月  27 18:13 infra/
-rwxrwxr-x  1 larry larry    321 9月  27 18:13 led*
-rw-rw-r--  1 larry larry    255 9月  27 18:13 led.bat
-rw-rw-r--  1 larry larry   1563 9月  27 18:13 LICENSE
-rwxrwxr-x  1 larry larry    328 9月  27 18:13 luci-auth*
-rw-rw-r--  1 larry larry    255 9月  27 18:13 luci-auth.bat
-rwxrwxr-x  1 larry larry    325 9月  27 18:13 lucicfg*
-rw-rw-r--  1 larry larry    259 9月  27 18:13 lucicfg.bat
-rwxrwxr-x  1 larry larry    331 9月  27 18:13 mac_toolchain*
drwxrwxr-x  6 larry larry   4096 9月  27 18:13 man/
-rw-rw-r--  1 larry larry   9429 9月  27 18:13 metrics.py
-rw-rw-r--  1 larry larry   4359 9月  27 18:13 metrics.README.md
-rw-rw-r--  1 larry larry   8811 9月  27 18:13 metrics_utils.py
-rwxrwxr-x  1 larry larry  33387 9月  27 18:13 my_activity.py*
-rwxrwxr-x  1 larry larry   1240 9月  27 18:13 ninja*
-rwxrwxr-x  1 larry larry 504320 9月  27 18:13 ninja.exe*
-rwxrwxr-x  1 larry larry 161640 9月  27 18:13 ninja-linux32*
-rwxrwxr-x  1 larry larry 183344 9月  27 18:13 ninja-linux64*
-rw-rw-r--  1 larry larry   1928 9月  27 18:13 ninjalog.README.md
-rwxrwxr-x  1 larry larry   6957 9月  27 18:13 ninjalog_uploader.py*
-rwxrwxr-x  1 larry larry   3240 9月  27 18:13 ninjalog_uploader_wrapper.py*
-rwxrwxr-x  1 larry larry 184804 9月  27 18:13 ninja-mac*
-rw-rw-r--  1 larry larry    547 9月  27 18:13 OWNERS
-rw-rw-r--  1 larry larry  12372 9月  27 18:13 owners_finder.py
-rw-rw-r--  1 larry larry  22092 9月  27 18:13 owners.py
-rw-rw-r--  1 larry larry  18113 9月  27 18:13 patch.py
-rw-rw-r--  1 larry larry  14077 9月  27 18:13 post_build_ninja_summary.py
-rw-rw-r--  1 larry larry  54760 9月  27 18:13 presubmit_canned_checks.py
-rw-rw-r--  1 larry larry   4745 9月  27 18:13 PRESUBMIT.py
-rwxrwxr-x  1 larry larry  61951 9月  27 18:13 presubmit_support.py*
-rw-rw-r--  1 larry larry    282 9月  27 18:13 profile.xml
-rwxrwxr-x  1 larry larry    323 9月  27 18:13 prpc*
-rw-rw-r--  1 larry larry    250 9月  27 18:13 prpc.bat
-rwxrwxr-x  1 larry larry    623 9月  27 18:13 pylint*
-rwxrwxr-x  1 larry larry    941 9月  27 18:13 pylint.py*
-rw-rw-r--  1 larry larry   9094 9月  27 18:13 pylintrc
-rwxrwxr-x  1 larry larry   1922 9月  27 18:13 python_runner.sh*
-rw-rw-r--  1 larry larry   3579 9月  27 18:13 README.gclient.md
-rw-rw-r--  1 larry larry   4969 9月  27 18:13 README.git-cl.md
-rw-rw-r--  1 larry larry   2839 9月  27 18:13 README.md
drwxrwxr-x  4 larry larry   4096 9月  27 18:13 recipes/
-rwxrwxr-x  1 larry larry  36090 9月  27 18:13 repo*
-rwxrwxr-x  1 larry larry    280 9月  27 18:13 roll-dep*
-rwxrwxr-x  1 larry larry    415 9月  27 18:13 roll-dep.bat*
-rwxrwxr-x  1 larry larry  10063 9月  27 18:13 roll_dep.py*
-rwxrwxr-x  1 larry larry    284 9月  27 18:13 roll-dep-svn*
-rwxrwxr-x  1 larry larry    419 9月  27 18:13 roll-dep-svn.bat*
-rwxrwxr-x  1 larry larry  15685 9月  27 18:13 roll_dep_svn.py*
-rw-rw-r--  1 larry larry  13595 9月  27 18:13 scm.py
-rw-rw-r--  1 larry larry   3662 9月  27 18:13 setup_color.py
-rw-rw-r--  1 larry larry   9194 9月  27 18:13 split_cl.py
-rw-rw-r--  1 larry larry     34 9月  27 18:13 .style.yapf
-rw-rw-r--  1 larry larry   9011 9月  27 18:13 subcommand.py
-rw-rw-r--  1 larry larry  15589 9月  27 18:13 subprocess2.py
drwxrwxr-x  2 larry larry   4096 9月  27 18:13 support/
drwxrwxr-x  2 larry larry   4096 9月  27 18:13 testing_support/
drwxrwxr-x  3 larry larry   4096 9月  27 18:13 tests/
drwxrwxr-x 13 larry larry   4096 9月  27 18:13 third_party/
-rwxrwxr-x  1 larry larry   3493 9月  27 18:13 update_depot_tools*
-rw-rw-r--  1 larry larry   1906 9月  27 18:13 update_depot_tools.bat
-rw-rw-r--  1 larry larry   1112 9月  27 18:13 update_depot_tools_toggle.py
-rw-rw-r--  1 larry larry    604 9月  27 18:13 upload_metrics.py
-rwxrwxr-x  1 larry larry  10666 9月  27 18:13 upload_to_google_storage.py*
-rwxrwxr-x  1 larry larry   1009 9月  27 18:13 vpython*
-rw-rw-r--  1 larry larry    146 9月  27 18:13 .vpython
-rw-rw-r--  1 larry larry    259 9月  27 18:13 vpython.bat
-rwxrwxr-x  1 larry larry   4378 9月  27 18:13 watchlists.py*
-rwxrwxr-x  1 larry larry   1621 9月  27 18:13 weekly*
drwxrwxr-x  2 larry larry   4096 9月  27 18:13 win_toolchain/
-rwxrwxr-x  1 larry larry   2151 9月  27 18:13 wtf*
-rwxrwxr-x  1 larry larry    274 9月  27 18:13 yapf*
-rwxrwxr-x  1 larry larry    409 9月  27 18:13 yapf.bat*
drwxrwxr-x  2 larry larry   4096 9月  27 18:13 zsh-goodies/
[email protected]-VirtualBox:~/opt/depot_tools$ git checkout -b remotes/origin/chromium.org/chrome/3865
切換到一個新分支 'remotes/origin/chromium.org/chrome/3865'
[email protected]-VirtualBox:~/opt/depot_tools$ git branch -m remotes/origin/chromium.org/chrome/3865 master
[email protected]-VirtualBox:~/opt/depot_tools$ git show-ref
57ed3aedaef3e9eabf9d8ea19f99ebbe8925b7be refs/heads/master
57ed3aedaef3e9eabf9d8ea19f99ebbe8925b7be refs/remotes/origin/chromium.org/chrome/3865
9c96f7437ed546a93ba8b405d47265e50f1ca31c refs/remotes/origin/chromium.org/chrome/3904
5316f2b377a2c66279abaf35bc3f5971e4852ee4 refs/remotes/origin/chromium.org/chrome/3987
af45aa86aced54e87d3a5f061b504fd486694a27 refs/remotes/origin/chromium.org/chrome/4147
0b92d49c8c3e90e988288a63ea11dc2860387845 refs/remotes/origin/chromium.org/infra/config
f35d3508ebd8c98d6c3b6ebfebe4895b374dbc07 refs/remotes/origin/chromium.org/main
a6baf70a45b04731ed99f47a0fbfcb5f28a1f03e refs/remotes/origin/chromium.org/master
[email protected]-VirtualBox:~/opt/depot_tools$ 


           

問題3:擷取chromium源碼

[email protected]-VirtualBox:~$ cd opt/
[email protected]-VirtualBox:~/opt$ git clone https://source.codeaurora.org/quic/lc/chromium
正克隆到 'chromium'...
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1499019 (delta 0), reused 0 (delta 0), pack-reused 1499018
接收對象中: 100% (1499019/1499019), 1.45 GiB | 650.00 KiB/s, 完成.
處理 delta 中: 100% (1185429/1185429), 完成.
檢查連接配接... 完成。
warning: 遠端 HEAD 指向一個不存在的引用,無法檢出。

[email protected]-VirtualBox:~/opt$ cd chromium/
[email protected]-VirtualBox:~/opt/chromium$ git show-ref
07ca5b139b967f62b03f08fca5d6f37a373ed20f refs/remotes/origin/chromium.org/trunk
[email protected]-VirtualBox:~/opt/chromium$ git branch
[email protected]-VirtualBox:~/opt/chromium$ git branch -a
  remotes/origin/chromium.org/trunk
[email protected]-VirtualBox:~/opt/chromium$ git checkout remotes/origin/chromium.org/trunk
正在檢出檔案: 100% (43165/43165), 完成.
Note: checking out 'remotes/origin/chromium.org/trunk'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD 目前位于 07ca5b1... tcmalloc: fixed config_linux.h to build for arm targets.
[email protected]-VirtualBox:~/opt/chromium$ git checkout -b remotes/origin/chromium.org/trunk
切換到一個新分支 'remotes/origin/chromium.org/trunk'
[email protected]-VirtualBox:~/opt/chromium$ git branch -m remotes/origin/chromium.org/trunk master
[email protected]-VirtualBox:~/opt/chromium$ git show-ref
07ca5b139b967f62b03f08fca5d6f37a373ed20f refs/heads/master
07ca5b139b967f62b03f08fca5d6f37a373ed20f refs/remotes/origin/chromium.org/trunk
[email protected]-VirtualBox:~/opt/chromium$