From: Thierry Moreau <thierry.moreau@connotech.com>
To: git@vger.kernel.org
Subject: Self-inflicted "abort" in a newbie attempt at read-only exploration of a cloned repository?
Date: Thu, 05 Apr 2018 19:42:59 +0000 [thread overview]
Message-ID: <5AC67C43.9080500@connotech.com> (raw)
Dear GIT enthusiasts!
This ends up with a "git checkout" command aborting. A bit frustrating
at the early stage of GIT learning curve.
My first goal is to clone repositories locally in order to explore the
various linux kernel versions, with the rich GIT metadata.
Thus, I clone:
$ git clone --branch linux-4.16.y
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
linux-stable
$ git -C linux-stable/ branch
* linux-4.16.y
So far so good. Then, I want to extract an earlier kernel version into a
tmp dir:
$ mkdir tmp
$ git -C linux-stable/ --work-tree $PWD/tmp/ checkout linux-4.15.y
$ git -C linux-stable/ branch
* linux-4.15.y
linux-4.16.y
I got my extracted 4.15 version but the source repository (index? ...?)
has somehow changed. Let me try something silly:
$ git -C linux-stable/ --work-tree $PWD/tmp/ checkout linux-4.14.y
$ git -C linux-stable/ branch
* linux-4.14.y
linux-4.15.y
linux-4.16.y
I indeed switched my extracted version from 4.15 to 4.14, but I am
puzzled that the local source repository (linux-stable) is modified.
Then I try to bring it back closer to its original state, just to keep
things tidy:
$ git -C linux-stable/ checkout linux-4.16.y
And this command aborts, both with Git versions 2.01 and 2.17. Here is
the truncated command output:
error: Your local changes to the following files would be overwritten by
checkout:
.gitignore
.mailmap
Documentation/00-INDEX
Documentation/ABI/obsolete/sysfs-gpio
Documentation/ABI/stable/sysfs-bus-vmbus
Documentation/ABI/stable/sysfs-devices
[... ...]
Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
Documentation/devicetree/bindings/arm/omap/crossbar.txt
Documentation/devicetree/bindings/arm/omap/ctrl.txt
Documentation/devicetree/bindings/arm/realtek.txt
Documentation/devicetree/bindings/arm/rock
error: The following untracked working tree files would be overwritten
by checkout:
Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Diagram.html
Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.html
Documentation/RCU/Design/Memory-Ordering/TreeRCU-callback-invocation.svg
Documentation/RCU/Design/Memory-Ordering/TreeRCU-callback-registry.svg
Documentation/RCU/Design/Memory-Ordering/TreeRCU-dyntick.svg
[... ...]
arch/riscv/include/asm/smp.h
arch/riscv/include/asm/spinlock.h
arch/riscv/include/asm/spinlock_types.h
arch/riscv/include/asm/string.h
arch/riscv/include/
Aborting
Questions:
=========
Is there a GIT tutorial that begins with my stated goal of an
extract-only usage of cloned GIT repositories? (Maybe the root cause is
my reluctance to learn the more involved GIT usages.)
Does the above reproducible abort deserve attention?
Any suggestion for my stated goal?
Thanks in advance,
- Thierry Moreau
next reply other threads:[~2018-04-05 19:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 19:42 Thierry Moreau [this message]
2018-04-05 23:18 ` Self-inflicted "abort" in a newbie attempt at read-only exploration of a cloned repository? Bryan Turner
2018-04-05 23:34 ` Bryan Turner
2018-04-06 0:50 ` Thierry Moreau
2018-04-06 19:56 ` Jeff King
2018-04-06 20:27 ` Thierry Moreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5AC67C43.9080500@connotech.com \
--to=thierry.moreau@connotech.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).