I've created a project, and used svn import
. Now I'd like to commit a change to files, how to do that?
I have empty ~/.workspace/project/.svn/entries
.
If I try svn commit I get this:
$ svn commit src/dat/Win.java
svn: '/home/st/.workspace/dat/src/dat' is not a working copy
svn: Can't open file '/home/st/.workspace/dat/src/dat/.svn/entries': No such file or
directory
… or just svn commit
:
$ svn commit
svn: Can't read file '/home/st/.workspace/dat/.svn/entries': End of file found
svn import commit an unversioned file to a repository (on a remote host presumably). After you've done this you need to checkout the repository to you own machine as working copy using
svn checkout http://some.repository.net/trunk/ /my/local/path/to/workingcopy
which will checkout trunk from the repo to your machine to folder /my/local/path/to/workingcopy. Make changed and then do.
svn commit -m "A comment telling what you did the which file"
or if you added some files to the working copy do:
svn add /path/to/file /path/to/otherfile
or
svn add /path/to/dir --force
which will add everything in the directory and all of it's subdirectories to the working copy, and finally
svn commit -m "who did what why"
Before committing, you need to checkout a fresh copy of the just imported files. Delete (or rename) you're project directory, and do svn checkout [REPOSPATH]
.
Then you have a working copy. After you change a file in you're working copy, you can use svn commit
.
See Getting Data into your Repository in the SVN Book.
You cannot commit changes without checking out a local copy of the repository first.
Check out the repository into a local directory using:
svn checkout file:///path/to/repo
Run the following to submit your changes:
svn commit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With