Su | Mo | Tu | We | Th | Fr | Sa |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
Keeping track of your edits to important text files? Don't litter your directories with file.old, file.old-version-1, file.bak and similar untidy file names. Instead, make use of 'RCS' - you only need a few simple commands - and all your changes are tracked carefully, and optionally with descriptive comments. Here's how:
Begin by creating a directory called 'RCS':
mkdir RCS
'Check in' your file to the RCS directory
ci -l filename.txt
Enter a descriptive comment, terminated with a '.' on a line by itself. If you don't want to added a comment just type '.'.
Make some edits to your file, and then check it in again
ci -l filename.txt
Again, enter some more descriptive comments, terminated with a '.' on a line by itself
Then if you want to see the history of the file, type:
rlog filename.txt
If you want to see what you have changed recently, and not checked in:
rcsdiff filename.txt
And if you want to compare two specific versions of the file:
rcsdiff -r1.1 -r1.2 filename.txt
Finally, for reference:
man rcsintro
Gives a large amount of additional information, but the small number of commands described here are very powerful for tracking your local edits to important files - and are highly recommended!