Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1038485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:58:53+00:00 2026-05-16T14:58:53+00:00

$ git –version git version 1.7.0.3 I clone an SVN repository, and make a

  • 0
$ git --version
git version 1.7.0.3

I clone an SVN repository, and make a commit:

$ git svn clone --stdlayout http://svn/example/project
$ echo test >> blah.txt
$ git commit -m "Something"

When I try and dcommit back to the SVN, I get the following error:

$ git svn dcommit
Cannot dcommit with a dirty index.  Commit your changes first, or stash them with `git stash'.
 at .../git/1.7.0.3/.../libexec/git-core/git-svn line 497

..despite the branch being seemingly clean:

$ git status
# On branch master
nothing to commit (working directory clean)

The only place I can see the non-existent “unstaged changes” is in gitk, where it says “Local uncommitted changes, not checked in to index”

Running git stash allows the dcommit to work for some reason:

$ git stash
No local changes to save
$ git svn dcommit
Committing to http://svn/example/project ...
        M       blah.txt
Committed r65913
        M       blah.txt
r65913 = a5547d761108d233211f115429e23ddca73bf4bc (refs/remotes/trunk)
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk

I have an alias to run git stash; git svn dcommit; git stash apply – but this is not the best workaround, as it causes merge errors when using actually using the stash

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:58:53+00:00Added an answer on May 16, 2026 at 2:58 pm

    As I was writing the question, I found the following commit:

    http://repo.or.cz/w/git.git/commitdiff/181264ad590ffef9d956fdd023369869c2d0a55f

    The dcommit command fails if an
    otherwise unmodified file has been
    touched in the working directory:

    Cannot dcommit with a dirty index.  Commit your changes
    first, or stash them with `git stash'.
    

    This happens because “git diff-index”
    reports a difference between the index
    and the filesystem:

    :100644 100644 d00491...... 000000...... M      file
    

    The fix is to run “git update-index
    –refresh” before “git diff-index” as is done in git-rebase and
    git-rebase–interactive before “git
    diff-files”.

    This changes dcommit to display a list
    of modified files before exiting.

    Also add a similar test case for “git
    svn rebase”.

    Can’t decipher from the git log what version the change is in, but it looks like the change should be in the version after 1.7.2.2

    Edit: As of Nov 19, 2011, the commit is still only in the master branch:

    $ git branch --contains 181264ad590ffef9d956fdd023369869c2d0a55f
    * master
    

    Edit2: This change is now in git 1.7.3 onwards

    > git tag --contains 181264ad590ffef9d956fdd023369869c2d0a55f | sort -V
    v1.7.3
    [...]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Git uses SHA-1 for the user to refer a commit. Subversion (SVN) and Mercurial
git version 1.7.7 I have dropbox git repository. From my works computer karl-sun I
git version 1.7.4.1 Ubuntu Currently I am working on a project at my company.
git clone blah git checkout -b development git checkout -b bug581 hack hack git
git version 1.7.4.4 I am working on a new project from my development team.
git version 1.7.7.4 I went to clone from my git respository and I got
Git newbie here. Using Xcode 4.3.2. Had to move my project file directory. Commit
git clone supports both HTTPS and SSH remote URLs. Which should I use? What
git clone git@github.com:foo/bar.git bar-master git branch release git push origin release git clone -b
(git version 1.6.5.7) When I run git diff the output has a nice scope

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.