John Blischak Define repository in version-your-code section.  about 9 years ago

Commit id: c1f12ba4ef568b11125c7d9d20e1c730391f39ac

deletions | additions      

       

\subsection{Share your code}  Once you have your files saved in a Git repository, you can share it with your collaborators and the wider scientific community by putting your code online.  This also has the added benefit of creating a backup of your work and provides a mechanism for syncing your files across multiple computers. Sharing a repository is made easier if you use one of the many online services that host Git repositories (Table 1), e.g. GitHub. A repository contains the version of the files from the last commit as well as all the versions from previous snapshots.  However, Note, however, that  any files that have not been tracked with at least one commit are not included in the Git repository, even if they are located within the same directory on your local computer (see Box 3 for advice on the types of files that should not be versioned with Git). To begin using GitHub, you will first need to sign up for an account.  For the examples in this tutorial, we will use the fake username "scientist123".         

\end{lstlisting}  To start versioning your code with Git, navigate to your newly created or existing project directory (in this case, \verb|~/thesis|).  Start tracking your code by running the command \verb|git init|, which initializes a new Git repository(Box 1)  in the current folder. A repository refers to the current version of the tracked files as well as all the previously saved versions (Box 1).  \begin{lstlisting}  $ cd ~/thesis