TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: JAN PANTELTJE
from: MARTIN GREGORIE
date: 2018-08-07 12:08:00
subject: Re: Create NDIF disk imag

On Tue, 07 Aug 2018 10:40:33 +0000, Jan Panteltje wrote:

> I use a backup script per program code I work on.
> You can use cp -urp if you want recursive.
>
The best way to avoid losing source code, scripts, web pages, etc is to
use a version control package in addition to conventional backups.

I generally use CVS but am also using git for a couple of projects.

CVS is quite old now, but has two advantages:

- its source repository is always separate from the source code. It may
  be in a different user on the same host, but it can equally be on a
  separate server on your LAN

- everybody commits to the same repository

- as the repository is a mirror of your source tree, it can sometimes be
  convenient to go in as the CVS user and modify it with cp, mv and
  friends or to edit source files (these contain the original source
  with sets of comment+changes appended for each commit

git seems pretty good, but:
- its repository is a large, opaque file structure in the root directory
  of the source tree, so if it does wrong you're stuffed.

- you can, however, push the local repository to update a remote one (on
  github or your own server) and pull a fresh update from the remote
  repository followed by an update to bring your source tree into line
  with the local repository.

Both have the advantage that, if you completely screw up an edit, you
just delete the wrecked file and run an update, which pulls the latest
version out of the repository.

In both version control systems, if its a shared project you need to run
an update to pull down the latest commits before editing anything ('cvs
update' for CVS and 'git pull; git update' for git.

I've been using version control systems for over 3 decades and would not
dream of writing code, scripts or web pages without using version control.

My local CVS repository is on my house server and is used for all
projects regardless of whether they are developed on the server, one of
my laptops or my Raspberrypi.


--
Martin    | martin at
Gregorie  | gregorie dot org

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.