From: "Santi Béjar" <sbejar@gmail.com>
To: "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: index manipulation quickref
Date: Tue, 12 Dec 2006 12:28:07 +0100 [thread overview]
Message-ID: <8aa486160612120328x2ab64c78v6a6d5bc2a64caf26@mail.gmail.com> (raw)
In-Reply-To: <fcaeb9bf0612120257p35dc9483ob65eea9ae21b5f7b@mail.gmail.com>
On 12/12/06, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
> Hi,
>
> I'm trying to collect all operations related to index from user
> perspective and corresponding commands. The list may be put to git
> wiki if people think it can help newbies:
Cool. But for "index-newbies" not "git-newbies" :)
We could add (if exists) the porcelain-ish equivalent as:
update file content to index:
git update-index file
git add file (the development version)
add a file to index:
git update-index --add file
git add file
delete a file from index:
git update-index --remove [--force-remove] file
git rm file
read a tree to index:
git read-tree treeish
git reset commit-ish # It changes also the HEAD
read a file from a tree to index:
git ls-tree treeish file | git update-index --index-info --stdin
N/A
copy a file from index to workdir:
git checkout-index file
git checkout file
refresh index:
git update-index --refresh
git status # It does more things
copy entire index to workdir:
git checkout-index
git checkout -f
output a file from index to stdout:
git cat-file blob :file (or :n:file, where n=0,1,2,3 are the unmerged stage)
??
list files in index:
git ls-files
??
compare index and workdir file listing:
git ls-files (with lots of options here)
git status?
diff between workdir and index:
git diff-files
git diff
diff between index and a tree:
git diff-index --cached treeish
git diff --cached treeish
next prev parent reply other threads:[~2006-12-12 11:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-12 10:57 index manipulation quickref Nguyen Thai Ngoc Duy
2006-12-12 11:16 ` Jakub Narebski
2006-12-12 11:28 ` Santi Béjar [this message]
2006-12-12 18:18 ` Junio C Hamano
2006-12-12 21:32 ` Nguyen Thai Ngoc Duy
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=8aa486160612120328x2ab64c78v6a6d5bc2a64caf26@mail.gmail.com \
--to=sbejar@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
/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).