Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 839
ekd123 Avatar asked Aug 30 '12 00:08

ekd123


People also ask

What is svn add?

svn add adds an item (file or directory) to a local working copy. svn add is a local operation and does not contact server. No changes made to a repository when you run svn add . It simply schedules and item to be committed to a repository next time your run svn commit .

What is the equivalent of svn update in git?

An equivalent of "svn update" would be "git pull --rebase".

Is svn checkout same as git clone?

git clone is more of an analogue to svn checkout than git checkout . git checkout just checks out a branch or commit from your local repository. git clone makes a new copy of a remote repository. Save this answer.


1 Answers

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.

like image 123
Greg Hewgill Avatar answered Oct 27 '22 17:10

Greg Hewgill