git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Konstantin Khomoutov <kostix@bswap.ru>
To: Ingo Wolf <ingo.wolf@gmx.de>
Cc: Git List <git@vger.kernel.org>
Subject: Re: No Checkout / Read Only config Flag
Date: Fri, 8 Nov 2019 18:50:37 +0300	[thread overview]
Message-ID: <20191108155037.rru2glzbdw4npnte@carbon> (raw)
In-Reply-To: <f3378b7b-c745-58db-55ed-c2c2a6818734@gmx.de>

On Thu, Nov 07, 2019 at 10:34:32PM +0100, Ingo Wolf wrote:

> is there a readonly / no checkout flag in the git configs?
> 
> I use Git to trace / Backup some worktrees and would like to prevent
> changing them accidentally with git.

There's so-called "sparse checkout" feature in Git: it allows the user
to designate parts of the work tree hierarchy as uninteresting, and Git
won't touch them unless told otherwise.

Please refer to the section "SPARSE CHECKOUT" in the git-read-tree
manual page (run `git help read-tree`).

To cite the git-checkout manual page:

| --ignore-skip-worktree-bits
|   In sparse checkout mode, git checkout -- <paths> would update only
|   entries matched by <paths> and sparse patterns in
|   $GIT_DIR/info/sparse-checkout. This option ignores the sparse patterns
|   and adds back any files in <paths>.


  reply	other threads:[~2019-11-08 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 21:34 No Checkout / Read Only config Flag Ingo Wolf
2019-11-08 15:50 ` Konstantin Khomoutov [this message]
2019-11-08 16:08 ` Philip Oakley

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191108155037.rru2glzbdw4npnte@carbon \
    --to=kostix@bswap.ru \
    --cc=git@vger.kernel.org \
    --cc=ingo.wolf@gmx.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).