Changes between Initial Version and Version 1 of cypress/svn

Aug 17, 2015 1:30:06 PM (7 years ago)


  • cypress/svn

    v1 v1  
     2= Version Control with Subversion (svn) =
     3== What is SVN? ==
     4* A free/open-source version control system.
     5* Managing files and directories over time, placed into a central repository.
     6* The repository remembers every changes ever made to the files and directories.
     7* Accessible across networks, allowing to be used on different computers.
     8* Runs on Many platforms.
     10[ Home Page]
     14== Good things... ==
     15* If you develop a software with some other people, it keeps track of who did what when and where changes.
     16   * even if you develop a software yourself...
     17* When you made a stupid change and screwed up ....
     18   * Allows you to go back.
     19   * Revert to a previous revision of a file/directory.
     23== First things to do ==
     24* Create a repository on ''Cypress''
     25 svnadmin create $HOME/repos
     26This creates a repository under '$HOME/repos'.
     28Note that $HOME is your home-directory on ''sphynx''.
     30Once you did this, you don't have to do this again.  Do not delete '$HOME/repos' !!!
     32* Testing your repository
     33On ''sphynx'',
     34 mkdir mywork
     35 cd mywork
     36 mkdir project1
     37 echo "This is README.txt" > README.txt
     38 svn import file:///$HOME/repos/project1 -m"initial import"
     39Now you have ''project1'' in your repository.
     41Delete ''project1'' then checkout ''project1'' from the repository,
     42 cd ..
     43 rm -rf project1
     44 svn co file:///$HOME/repos/project1 ./project1
     46=== Working with SVN ===
     47* To download files in a repository, use ''''svn checkout'''' / ''''svn co'''' command.
     48* If you made some changes to the files in your local machine and want to upload these to the repository, use ''''svn commit'''' command.
     49* If you have files on your local machine and want to update these to the latest version in the repository, use ''''svn update'''' command.
     50* If you want to add a file/direcotry, use ''''svn add'''' and commit.
     51* If you want to delete a file/directory, use ''''svn delete'''' and commit.
     53=== What to Control ===
     54* Source Code
     55* Documents
     56* Variable data
     57* Anything you want to share that isn't essentially static data.
     58'''Do not upload.... Large sets of binary files; images, movie, music....'''
     60=== Accessing your Repository over Network ===
     61To access your Repository on ''sphynx' through ''ssh'' from other hosts,
     62 svn co svn+ssh://''USERNAME''''HOME_DIRCTORY''/repos/project1 ./project1
     64You will be asked for typing your password on ''sphynx''.
     66''USERNAME'' and ''HOME_DIRCTORY'' are your login user name and home directory on ''sphynx''.
     68To see the path of your home directory, on ''sphynx''
     69 cat $HOME
     71* Using svn-client software with GUI
     72** There are Windows Versions and Mac OS versions.
     73***[ Client Software Review]
     75=== Try using Your Repository ===
     76==== Check out data ====
     77Somewhere on ''sphynx'',
     78 svn co file:///$HOME/repos/project1 ./project1
     79go into '''project1''' directory.
     80 cd project1
     82look at files
     83 ls
     85==== Edit README.txt ====
     86Edit '''README.txt''' to add your message.
     88then commit it.
     89 svn commit -m"your message"
     92==== When you made a stupid change or delete a file by mistake ====
     93You can revert to a previous version.
     95To look at the log
     96 svn log
     98If you want to download version 1,
     99 svn -r 1 update
     101When you delete '''README.txt by mistake,
     102 rm '''README.txt'''
     104See the file you deleted does not exist.
     105 ls
     107Download the missing file,
     108 svn update
     110==== Add files ====
     111Make a new file, then add it to svn by
     112 svn add NEW_FILE_YOU_MADE
     115 svn commit -m"your message"
     117==== Check status ====
     118To check the status
     119 svn stat
     121To see the difference between the repository and your working version
     122 svn diff
     124==== Upload ====
     125To upload your working version to the repository,
     126 svn commit -m"comment for current version"
     128Look at the status and difference
     129 svn stat
     130 svn diff
     132==== Help ====
     133 svn help