Visual Git Safe




All It Does

  • Step 1: 3 git hooks are added. These hooks are small bash scripts in the .git directory that create a small (1 line) text file on a shared drive when the user runs git commit, git checkout, or git pull. This is only so the program knows you did a checkout, commit, or pull.
  • Step 2: It calls git status --prorcelain to get the list of file names you are editing.
  • Step 3: It writes the list of file names from step 2 above to a small text file on a shared drive.
  • Step 4: It watches the directory your source code is in using a C# FileSystemWatcher. If a file changes, it does Step 2 and Step 3 above.
  • Step 5: It watches the shared folder using a C# FileSystemWatcher. If it sees a .git file from step 1 above, it does Step 2 and Step 3 above. If it sees someone else's list of file names changed, it reads the list of files and marks those files as read-only on your computer.
  • Step 6: It displays the list of files you are editing (from Step 1), the list of files others are editing (from Step 5) and displays any conflicts.
  • Those git hooks just create a text file.
  • The only git command the program runs is git status.
  • The only text files created are the files from the git hooks and files containing the list of file names people are editing.
  • It watches directories using the FileSystemWatcher in C#.
  • The program doesn't download source code files, or alter source code files, or delete source code files. But it does mark some source code files Read Only if you turn on that feature.
  • The program is a C# Windows desktop program with a user interface showing what files are being changed. If you close the program, it shuts down and stops looking for changes.
  • You don't need to install it, you can just run it by downloading the .Exe file and clicking on it. In fact, you can just download the source code, compile it, and run it in debug mode if you want.