What version-control system is most trivial to set up and use for toy projects?

前端 未结 18 1881
别跟我提以往
别跟我提以往 2020-12-12 14:37

I teach the third required intro course in a CS department. One of my homework assignments asks students to speed up code they have written for a previous assignment. Fact

18条回答
  •  再見小時候
    2020-12-12 14:54

    Setting up a subversion repository is trivial; I frequently set one up as a one-off thing for small projects (such as developing code for an answer on Stack Overflow!), and I doubt anybody else who could learn an SCM system at all would have any trouble with it.

    $ svnadmin create /home/cjs/repo
    $ mkdir my-project
    $ cd my-project
    $ vi hello.c
      [...hack hack hack...]
    $ svn import -m 'Initial project import.' file:///home/cjs/repo
    Adding         hello.c
    
    Committed revision 1.
    

    That said, sharing is certainly an issue. If the students always work together when they work simultaneously, they could use a USB drive, since they can just unplug it and pass it back and forth when one needs to comit, and the person who's going to program alone later can just hang on to it. That's not entirely convenient, though.

    Another option, since they all appear to be working on a shared Unix system, is to create a directory with the execute but not read bit set for the rest of the group (or all users) and use a s3cr3t name for the repo under that, one that only the two students know. Passing that secret name on to the prof would allow him to examine student's repos at any time, as well. ("So you submitted the assignment on time, but the e-mail system lost it? Let me just look at the time of that commit....") A script could help set this up.

    In fact, the more I think about that, the more I'm beginning to like it. In certain ways, it's simpler than the git solution because the student doesn't have to deal with passing patches around (or forgetting to do so) and the student will be forced to deal with merges before he commits, rather than once things are in the repository (with the subsequent ability to delay dealing with that indefinitely).

提交回复
热议问题