When using Git I usually use gi开发者_开发知识库t add --all
and then commit. I'm using SSH SVN through a terminal, and I want to add a file, but what is the command?
Note that svn add
is different from git add
in that svn add
adds new files (and folders), whereas git add
adds new files and modifications to tracked files.
So after adding files in SVN, doing a svn commit
(without a specific path) will commit the modifications as well. There is no need to add modified files in SVN for a commit. And you also have to be careful about exactly what you are committing.
svn add <file>
; the file then is "marked" for addition. Next time you commit, the file will be added to the repository.
So if you want to only add one file into the repository, use svn add <file>
followed by svn commit <file>
.
First, add the file to the repository using svn add filename
. Then you actually have to commit it to the server, which I'm sure you know how to do. (svn commit filename
)
精彩评论