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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With