Re: [git-users] Re: Documentation discrepancy

2012-06-26 Thread Konstantin Khomoutov
On Mon, 25 Jun 2012 22:23:35 -0700 (PDT) Git User wrote: > Thanks again. > > It seems I didn't express myself clearly. OK, let me elaborate on > specific examples: [...] Sorry, have no time to read thoroughly at the moment -- will come back to it later and try to grasp. > If it's too cumberso

Re: [git-users] Re: Documentation discrepancy

2012-06-26 Thread Git User
Thanks a lot everyone. Finally figured it out. I think that the following command sequence will do the trick: cp file file.unstaged git co file git commit file mv file.unstaged file I'll try to do a wrapper (`git-commit-staged' for example) and extend it on the case of multiple files. -- You

Re: [git-users] Re: Documentation discrepancy

2012-06-26 Thread Thomas Ferris Nicolaisen
Usually, the whole index is committed as an indivisible unit. The trick of git commit is that it avoids using the index completely. It goes straight from work-tree (file) to repository (blob), as far as I can understand. From the docs of git commit :

Re: [git-users] Re: Documentation discrepancy

2012-06-25 Thread Git User
Thanks again. It seems I didn't express myself clearly. OK, let me elaborate on specific examples: *Scenario 1:* *$ cat>a.txt * alpha *$ git add a.txt * *$ cat>>a.txt * beta *$ git st * # On branch master # Changes to be committed: # (use "git reset HEAD ..." to unstage) #

Re: [git-users] Re: Documentation discrepancy

2012-06-25 Thread Konstantin Khomoutov
On Sun, 24 Jun 2012 18:46:03 -0700 (PDT) Git User wrote: > Thanks to everyone. > Just one more thing: > If we could exclude that `git add file' part from `git commit file', > we would get the desired behavior, wouldn't we? > It seems to me like `git commit --staget file' is a subset of the > oper

Re: [git-users] Re: Documentation discrepancy

2012-06-24 Thread Git User
Thanks to everyone. Just one more thing: If we could exclude that `git add file' part from `git commit file', we would get the desired behavior, wouldn't we? It seems to me like `git commit --staget file' is a subset of the operation `git commit file'. Or I'm wrong ? -- You received this messag

Re: [git-users] Re: Documentation discrepancy

2012-06-24 Thread Philip Oakley
From: "Konstantin Khomoutov" To: Cc: "Git User" Sent: Friday, June 22, 2012 2:40 PM Subject: Re: [git-users] Re: Documentation discrepancy On Thu, 21 Jun 2012 18:06:29 -0700 (PDT) Git User wrote: Thank you. Here is what I meant: echo alpha > a.txt add a.txt echo

Re: [git-users] Re: Documentation discrepancy

2012-06-22 Thread Konstantin Khomoutov
On Thu, 21 Jun 2012 18:06:29 -0700 (PDT) Git User wrote: > Thank you. > Here is what I meant: > echo alpha > a.txt > add a.txt > echo beta > b.txt > add b.txt > echo gamma >> b.txt > > Now I have a.txt and b.txt in staged state; and b.txt also has > unstaged changes. > I want to commit ONLY b.tx

Re: [git-users] Re: Documentation discrepancy

2012-06-21 Thread Git User
Thank you. Here is what I meant: echo alpha > a.txt add a.txt echo beta > b.txt add b.txt echo gamma >> b.txt Now I have a.txt and b.txt in staged state; and b.txt also has unstaged changes. I want to commit ONLY b.txt (i.e. I want to commit only 'beta' and leave b.txt in modified state with 'be

Re: [git-users] Re: Documentation discrepancy

2012-06-21 Thread Konstantin Khomoutov
On Wed, 20 Jun 2012 18:52:52 -0700 (PDT) Git User wrote: [...] > One more question. > Is there an option to commit only specified files in their staged > state without doing `git add' on them ? There's a contradiction in your question: "the staged state" is the state of the files as recorded in t