[Cin] Tried gitwatch

Andrew Randrianasulu randrianasulu at gmail.com
Fri Jan 15 16:11:46 CET 2021


First I created .git/ directory by typing 'git init' in /dev/shm
where I have few BIG files and tmp dirs with compiled software
Initially I ran into problem that git was checking ALL my files, 
it was slow and wrong.

so, I consulted 'man gitignore'

It worked much better with this .gitignore in /dev/shm/ (as example)

(ignore all files BUT *.xml ones in tree, do not look into dirs)


---

*/*
*.*
!*.xml

now if you run ./gitwatch from its own git tree, you will see ....

./gitwatch.sh /dev/shm/
[master d067f65] Scripted auto-commit on change (2021-01-15 17:46:25) by gitwatch.sh
 1 file changed, 1 insertion(+), 1 deletion(-)
[master 30c5669] Scripted auto-commit on change (2021-01-15 17:46:35) by gitwatch.sh
 1 file changed, 1 insertion(+)
 create mode 120000 .#1.xml
[master 4ac3506] Scripted auto-commit on change (2021-01-15 17:46:38) by gitwatch.sh
 2 files changed, 8 insertions(+), 2 deletions(-)
 delete mode 120000 .#1.xml
[master 77f79f9] Scripted auto-commit on change (2021-01-15 17:46:48) by gitwatch.sh
 1 file changed, 1 insertion(+)
 create mode 120000 .#1.xml
[master d8508b2] Scripted auto-commit on change (2021-01-15 17:46:59) by gitwatch.sh
 2 files changed, 1 insertion(+), 10 deletions(-)
 delete mode 120000 .#1.xml
^C

(I was using mc's editor)

Now you can look around by using git log, git reflog
and gitk (graphical git tree viewer)

And return to any point in time. (git reset --hard <commit> / git checkout <commit>)

Be aware, that wrong/absent .gitignore file WILL cause ALL stuff in dirs and subdirs
to be checked in, this is obviously (?) not that you want.

Yes, this is not out-of-the box, not GUI.
But.

IT WORKS.
-------------- next part --------------
*/*
*.*
!*.xml


More information about the Cin mailing list