I want to learn how to use git with svn repository.
I follow this manual: http://git-scm.com/book/en/Git-and-Other-Systems-Git-and-Subversion
I make some changes in my file. Some of them staged, some of them not:
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: CHANGES.txt
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: CHANGES.txt
#
According to the manual I first commit staged changes into my local repository:
$ git commit -m "new"
[master 21bf2bd] new
1 file changed, 1 insertion(+)
now I have only unstages changes, which I want to live like it is for the future commits:
$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: CHANGES.txt
#
no changes added to commit (use "git add" and/or "git commit -a")
And I want to push local commits upstream to svn:
$ git svn dcommit
CHANGES.txt: needs update
update-index --refresh: command returned error: 1
Why can't I do it?
When can I use "dcommit" and when I can't? I clearly lack this information, and I wasn't able to find more description in google or man pages.