<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[onecolumn,letterpaper,11pt]{article}

%===================================================================
\input{common_latex/common_latex_packages}
\input{common_latex/common_latex_definitions}
\input{common_latex/common_latex_help_format}
%===================================================================

\begin{document}

\begin{labcover}
\labtitle{Help Topic: The SVN Add and Remove Commands}
\vspace{0.1in}
\labdate{Spring 2021}
\vspace{0.1in}
\labauth{Michael Benjamin, mikerb@mit.edu}
\labauth{Department of Mechanical Engineering}
\labauth{MIT, Cambridge MA 02139}
\labline
\end{labcover}

\wikidoc{file=Help.SVNAddRemove}
\wikidoc{auth=mikerb@mit.edu}

%====================================================================
\section*{The SVN \cmd{add} and \cmd{remove} Commands}
%====================================================================

The \cmd{svn add} command allows you add files or a directories to
your locally checked out tree in preparation for committing them to
the svn server. And as you may guess, the \cmd{svn rm} command tags a
file in your local checkout for removal on the server upon your next
commit.  More info on \cmd{svn add} and \cmd{svn rm} can always be
found by Googling "Subversion book" and reading the full PDF online
free, or just typing \cmd{svn help add} anytime on the command
line.

%---------------------------------------------------------------------
\subsection*{Basic usage of the svn \cmd{add} command}

The basic syntax for the svn \cmd{status} command is:

\vspace{0.05in}
\begin{consoleverb}
 $ svn add my_file.cpp my_file.h        (one or more files)
 $ svn add my_project/                  (a directory) 
\end{consoleverb}
\vspace{0.15in}

\noindent
The \cmd{svn add} command does {\em not} require a network connection
to the server and only declares an intention to add file(s) to the
master copy on the svn server upon the next commit. Since \cmd{svn
status} also doesn't require a network connection to the server, you
can confirm the results of your add immmediately:

\vspace{0.1in}
\begin{consoleverb}
 $ svn status
 A       my_file.cpp
 A       my_file.h
 A       my_project
\end{consoleverb}
\vspace{0.1in}

\noindent
Note: When adding a directory, the operation is applied recursively to all
files and subdirectories.

\vspace{0.05in}
\noindent
Note: When adding a file, don't be afraid to use the command line conveniences
such as \cmd{svn add *.pdf}. If this matches a PDF that has already been added,
you will get harmless error message for that file. It can be safely ignored, and
you can assume all the previously unversioned PDF files will now be scheduled
for addition.

%---------------------------------------------------------------------
\subsection*{Basic usage of the svn \cmd{remove} command}

The basic syntax for the svn \cmd{remove} command (or \cmd{rm} for
short) is:

\vspace{0.05in}
\begin{consoleverb}
 $ svn rm my_file.cpp my_file.h        (one or more files)
 $ svn rm my_project/                  (a directory) 
\end{consoleverb}
\vspace{0.15in}

The \cmd{svn rm} command does {\em not} require a network connection
to the server and only declares an intention to remove the file(s)
from the master copy on the svn server upon the next commit.

\pskip
\noindent
Note: If removing a directory with files that are unversioned (not under
version control) the \cmd{svn rm} command will produce an error. The message
will point out the unversioned file and inform you that you can use
the \cmd{svn --force rm} option to remove a directory with unversioned files.



\end{document}

</pre></body></html>