Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between `svn add` and `svn commit` in Apache Subversion

What is the difference between Add and Commit in SVN?

I understand that Add adds a new file to SVN and Commit updates any changes done for an already existing file in the SVN

My question is, do I need to do a Commit after adding new files using Add?

like image 846
Reema Avatar asked Oct 19 '22 04:10

Reema


1 Answers

There is a great chapter in SVNBook which describes basic workflow with Subversion: SVNBook | Basic Work Cycle. The chapter explains, that svn add et all are commands related to making changes and svn commit is a command which publishes these changes to a repository as a new revision.

  • 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.

  • svn commit commits changes to a repository.

like image 153
bahrep Avatar answered Oct 22 '22 22:10

bahrep