File content change tracking

I need to monitor the changes of approximately 10 files in 4 folders and sub-folders in such a way that it makes it very easy to tell what's changed from a development perspective. All files are readable with notepad.

Assistance is greatly appreciated.
frugalmuleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
You in short are looking for a version control.
Much depends on what your intention and options.
How are files access.

There are a tool that monitors a folder.

Are these four files the only ones in these directories?

A backup setup that is cumulative,
Full, differential...
1
gr8gonzoConsultantCommented:
Arnold's correct. What you're asking is the basic functionality of any source control / version control system. A really powerful and free and popular one these days is Git. There are visual/GUI tools for it, but a lot of people use the command prompt. Here's an example of me using Git for Windows to:

1. Initialize version control for a new folder
git init
    Initialized empty Git repository in C:/experts_exchange/git_example/.git/

2. Create a new file
echo "A new file" > file.txt

3. Tell Git to start tracking it and create a commit (a snapshot of what that file looks like right at that moment):
git add file.txt
git commit -m "Version 1 of file.txt"
    [master (root-commit) 8a78942] Version 1 of file.txt
     1 file changed, 1 insertion(+)
     create mode 100644 file.txt


4. Change the file by adding another line to it:
echo "Another line added" >> file.txt

5. Use Git to show me the difference between the file's current data and what was most recently committed:
git diff file.txt
    diff --git a/file.txt b/file.txt
    index 24e7dfa..a455b05 100644
    --- a/file.txt
    +++ b/file.txt
    @@ -1 +1,2 @@
     A new file
    +Another line added


6. I'll go ahead and commit that change, too, and call it version 2:
git add file.txt
git commit -m "Version 2 of file.txt, with another line"
    [master bba105c] Version 2 of file.txt, with another line
     1 file changed, 1 insertion(+)


7. Now, I'll use a quick search-and-replace tool to change an existing word in the first line of the file:
sed -i s/A\ new/An\ existing/g file.txt

8. And now we'll see what the file currently looks like:
cat file.txt
    An existing file
    Another line added


9. And if we do a git diff on it, it will show us the change (the previous state of the line and what it looks like now):
git diff file.txt
    diff --git a/file.txt b/file.txt
    index a455b05..e408cff 100644
    --- a/file.txt
    +++ b/file.txt
    @@ -1,2 +1,2 @@
    -A new file
    +An existing file

     Another line added


There are tons of features within Git, but that's the basic idea. I wrote a beginner's article on Git and understanding what it does and how it works:
https://www.experts-exchange.com/articles/12235/Git-101.html

And the nice thing is that every commit/snapshot can be accessed at any time and it barely takes up any room on the hard disk. So if 10 years from now you want to take a look at what your files looked like at some point during those 10 years, just find the commit you want and check it out. You'll be able to see the data exactly as it was at that point in time.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
frugalmuleAuthor Commented:
Some 99% of changes come from three potential files from within a single folder.

If we could get that far, it would be helpful.

I'd like to see it visually with colorization etc.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

gr8gonzoConsultantCommented:
Well, the Git for Windows shell has colors, but if you want a full GUI, then SourceTree is a pretty good Git client. Here's a screenshot of it looking at that repository (I added a couple more files in so you could see 3 total commits that ended up with 3 files.
SourceTree screenshot
Again, there are a ton of features in Git (branching, tagging, remote and local sources, etc...), but you don't have to use all of them. If you simply want basic, local source control over a few files, then what I provided above should be enough.
0
gr8gonzoConsultantCommented:
Oh, and it's worth mentioning that to some newcomers, the weird gibberish commit numbers like "bc9e28d" and "6073bf5b...etc..." might seem intimidating. You don't really have to worry about those or remember them. They're simply unique identifiers for each commit (technically speaking, they are hash representations of that commit). You'd only ever pay attention to them if you were trying to do some more advanced stuff, like rolling back to an old commit or comparing two different commits, etc...
0
gr8gonzoConsultantCommented:
It should not require any accounts or anything. It's just a visual front-end for Git. BitBucket is just a separate service if you want to remotely host your code repositories.
0
gr8gonzoConsultantCommented:
Make sure you read a tutorial (my intro article should get you going a little bit, but you might need to read more if it's not clear enough) so you understand what you're doing in the tool.
0
frugalmuleAuthor Commented:
Unfortunately, sourcetree as I understand it will require the programmer to commit changes.  I don't want to add that step for him.  I simply want to be able to see the changes that he has made so that I can ask more intelligent questions of the developer.
0
arnoldCommented:
Then you have to monitor the folder, and on change copy those files that changed.

Here is a thought, the developer could use check out, check in. Or shoukd an error ve injected has to recover by taking as long as it takes.

A backup that maintains/retains versions..

Look at idrive.com as a cloud backup solution. It maintains versions of backed up files.
0
arnoldCommented:
Oh, unlike the document management systems referenced, you would need to restore files to other location and perform differential comparison versus as noted in the earlier comments have the versions compared....

Point being if an error is introduced, it might require several ........
0
frugalmuleAuthor Commented:
If we were to simplify and do this for one very frequently changing text file, how would we do it?

I just want the ability to view only, locally only, a side-by-side comparison of what has changed between "now" and a previously selected version.

What tool would we use for that, without having to commit changes either locally or to a repository?
0
arnoldCommented:
Windiff  compares file for file. Have not used it, but it is similar to diff on UNIX/Linux it can compare text files in folders.
0
gr8gonzoConsultantCommented:
I simply want to be able to see the changes that he has made
Changes from when and to when? Unless this is a one-shot thing where the developer will make one set of changes ONCE and then that's it, then you should be thinking about how this kind of concept will play out over several days of changes.

Let's say on Day 1, the developer makes a change that causes some bug. You see the change and you work with him/her to fix it.

Day 2, there is some other change but now you're going to see that change PLUS the changes from Day 1.

Day 3, you're going to see all the changes since Day 1.

Day 4, you're going to see all the changes since Day 1.

...

Day 60, you're going to see all the changes since Day 1.

Part of the point of committing is that you can more accurately see what has actually changed since the last time you sat down with the developer, rather than sifting through a ton of changes that were already made.

If you end up copying the files each day to try to make the end-of-day copies be the next "set" to compare against, then that is literally the same functional thing as committing, except it lacks tons of valuable information and completely loses history.

Every single developer worth his/her salt should be able to use version/source control. If they don't know it yet, then they'll need to learn. It's a mission-critical component for all companies, big and small. That developer better know how to commit, given that it takes all of a few seconds to do and isn't a complicated task by any means..
0
gr8gonzoConsultantCommented:
I mean, it's like saying you want to hire a chef but you you don't want them to take the extra step of cleaning up their kitchen space at the end of the day. Or hire a taxi driver but you don't want to bother them to check in their pickup logs.

Certain things are simply part of the job, and the use of version and source control systems is a standard part of a developer's job these days. You should be able to tell this person to do a commit of their changes at the end of each day, and they should be able to do it or learn how to do it in a very short period of time. These systems are meant to make the simple tasks, like committing a file, easy.

If a person cannot run two commands to commit their changes, then there's a much bigger problem at hand. On the command line, it's:
git add .
git commit -m "commit message here"

In sourcetree, it's a couple of clicks. It cannot get much easier than that, and it's much simpler and faster and more accurate than trying to manually compare files each day.
0
frugalmuleAuthor Commented:
gr,
Thank you for your comments.

What I would like to see is a side-by-side screen, much like the "history" section of a Google Spreadsheet.  It's very easy to see what changed at any prior point in time, who made that change, etc.  That's what I am looking for, something automatic like that.
0
gr8gonzoConsultantCommented:
I'm not sure what else to say except you are describing what version control can do. The side-by-side comparison can be achieved by telling git to use a different diff tool.
1
frugalmuleAuthor Commented:
I don't see a solution here, that will automatically keep up with changes without the developer having to 'commit' changes.
0
gr8gonzoConsultantCommented:
Can you elaborate on why you don't want to use commits? I'm trying to understand this resistance, but I don't see reason here. Committing is basically just saving. Again, it takes a few seconds and is one of the easiest things ever to do, and is a normal part of a developer's job.

You could even have a script that automatically adds all changes and commits for you throughout the day if you really wanted to (or maybe a couple times a day), but it's not a good way to develop code (but you could do it). I'm just puzzled to why you wouldn't want the developer to do this. I'm trying to figure out if it's just something where you're not fully understanding how simple this is, or if there's some other issue at hand.

In any event, I'm not going to push this anymore. If you don't want to burden the developer with a couple clicks or a couple commands, then good luck finding a better solution that will be efficient in the long term.
1
aikimarkCommented:
Alternatively, you could install automatic backup software.  This actively scans folders or hard drives and makes a copy of files after they are changed.  You will have to determine how many backup copies to keep and how they are administered.

so that I can ask more intelligent questions of the developer
Sounds like you have trust issues in your organization.  You should try paired programming.
0
frugalmuleAuthor Commented:
I guess I would need assistance with screen sharing in order to set it up.  I have been unsuccessful.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.