1

I wanted to do

git svn dcommit

but I am getting

Merge conflict during commit: File or directory 
'.gitignore' is out of date; try updating: resource
 out of date; try updating at /usr/lib/git-core/git-svn line 922

how to update from svn repo only the .gitignore?

MR.GEWA
  • 833
  • 1
  • 15
  • 37

1 Answers1

0

Sounds like you have uncommitted local changes to .gitignore - you will need to get them out of the way before you can update from the svn remote using git svn rebase.

Use

git stash

to temporarily hide your local changes, then use git svn rebase to get the latest version from svn. Next you can restore your temporary changes using

git stash pop

Git will report any conflicts which you can fix locally or if you decide you don't need your local changes anymore use:

git checkout -- .gitignore

to overwrite your local .gitignore file with the one fetched from the repository.

supermethod
  • 351
  • 3
  • 8
  • It updates from your default local branch so you need to fetch the updated version from the svn remote first. See updated answer – supermethod May 30 '12 at 16:13