Reputation: 2379
Can anyone tell me the command for updating a file in the SVN repository. The file is already imported, I just want to modify the changes.
The file is main.css
and the filepath /home/weblab/public_html/cake_1_2/app/webroot/css
.
Can someone give me the exact command?
Upvotes: 6
Views: 30736
Reputation: 6712
I'm guessing that you have used "svn import" to get the files into the repository. If that is the case, then your local file on disk is not part of a working copy and you will not be able to "svn commit" it.
In order to verify this, run svn info
from the directory your code is in. If it says: svn: '.' is not a working copy
, your current directory is not a working copy.
What you then need to do is:
svn checkout
your project from the repository to a local working copy (temporary directory).svn commit
those changes.After you've done that, rename the original project location (where you were working now) and move the working copy in it's place. You can now svn commit
as normal from your working copy.
If the folder you use now is called: /home/username/myproject
and the working copy is called /tmp/workingcopy
. Then you could type the following:
mv /home/username/myproject /home/username/myproject.old
mv /tmp/workingcopy /home/username/myproject
Now continue your work in /home/username/myproject
, you can delete myproject.old
if you are sure all of your code is in the svn repository
Upvotes: 9
Reputation: 65
Using Mac OS, and having an Url link to SVN. Follow the steps
-Open terminal.
-change directory to needed path(ex: cd Desktop/).
-Type command: svn checkout url
$MacBook-Pro:~ worktpg$ svn checkout http://stackoverflow.com/questions/
-Enter user name and password if prompted and wait for process to complete
-For Updating svn from terminal, cd to path and type command: svn update
Upvotes: 0
Reputation: 391276
There's three ways to interpret your question:
If the first, you need to first check out the file to a working copy on disk, then you move on to case 2.
If the second, you need to modify the file on disk with the changes, and then move on to case 3.
If the third, you need to commit the changes to the repository.
You do this with your chosen Subversion client. If this is the command line, a typical command looks like this:
svn ci -m "Text that describes the changes that were done"
The real problem here though is that you don't know how to use Subversion. I would find a Subversion tutorial and play around with it, create a temporary repository and put files into it, play around with the commit, checkout, revert, log, etc. commands to get a feel for how the system works.
Upvotes: 5
Reputation: 9028
Quick answer: Use 'Commit'
Well, which OS, which client?
If on windows, TortoiseSVN is best.
Upvotes: 1