Re: index manipulation quickref

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Nguyen Thai Ngoc Duy <pclouds@...>
Cc: <git@...>
Date: Tuesday, December 12, 2006 - 7:28 am

On 12/12/06, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:

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

Santi
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
index manipulation quickref, Nguyen Thai Ngoc Duy, (Tue Dec 12, 6:57 am)
Re: index manipulation quickref, Junio C Hamano, (Tue Dec 12, 2:18 pm)
Re: index manipulation quickref, Nguyen Thai Ngoc Duy, (Tue Dec 12, 5:32 pm)
Re: index manipulation quickref, , (Tue Dec 12, 7:28 am)