简体   繁体   中英

Subversion equivalent of "git add ."?

I'm switching to subversion from git but I found that "svn add." doesn't do the same as git.

It prints

svn: warning: W150002: '/home/mike/Projects/repos' is already under version control
svn: E200009: Could not add all targets because some targets are already versioned
svn: E200009: Illegal target for the requested operation

Does SVN have an equivalent? Or I must add them manually?

The svn add and git add commands do different things. The git add command is used to submit any change to any file (including new files) to the Git index, in preparation for a subsequent commit.

The svn add command is only used to add new files to the repository, when preparing for a commit. Changed files are submitted using the svn commit command, and do not need to be added first.

I found the same problem when copying multiple files of when creating a bunch of new ones. Although svn is different to git the closest thing to git add. is svn add * --force

For example if you had a directory with a bunch of new files and you were in the parent directory just run this:

$ svn add * --force
A      new/dir
A      new/dir/newfile1
A      new/dir/newfile2
...

svn导入 svn文档。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM