There are five programs that are installed with Git for Windows
Git Gui
Git Repo History
Git Repo File Browser (cf. Windows Explorer)
Git Repo File Viewer
Git Bash
The main Git Gui program shows the status of the next commit. There are four panes that show the current status of the git working area.
Pink pane: Working Directory
Green pane: Staging Area (changes that will be committed)
Yellow Pane: Changes for the file that is currently highlighted in blue. These changes are either in the Working Directory or the Staging area. The way the changes are displayed is explained below.
Commit Message Pane: Message for current commit.
Amend Last Commit Checkbox: If you check the amend box, it loads the last commit into the staging area and the last commit message into the Commit Message box. Then you can add or remove changes from the last commit.
Access gitk from the Git Gui Menu: Repository|Browse main's History
The top pane shows all the commits. Each line has the commit title, who made it and the timestamp.
The area below contains:
ID & position in the list of the current commit
Arrows to move up and down in the list.
Search for a certain commit based on the contents
Search within the current commit
Patch/Tree
Patch shows the changes for the commit
Tree shows the current status of all the files in the repository
Show the details of the commit that is highlighted in the top pane.
Similar to the Windows File Explorer, this allows you to select a file for viewing. Double click on a file to open it in the File Viewer. Double click on a directory to browse the files in that directory.
Shows the history of each line in an individual file.
The blue links to the left of the line tell you which commits (by ID) changed that line.
If you hover over a blue link, a pop-up shows the full commit ID, who made it, a timestamp for the commit, and the title of the commit.
If you double click on the blue link it shows more details of the commit and its changes to the file.
If you right click in the window it opens up a menu for searching and other useful stuff.
The Git Bash program allows a command line similar to the WSL system.
It provides many LInux programs (grep, awk, perl, etc.)
The utilities in Git Bash use Window line endings.
The Perl implementation can't be easily customized and is missing some modules that some DLS scripts use. For those scripts you will have use WSL.
The git gui programs show changes as they would be represented by the Linux diff program using the --unified option.
The changes between the two versions of a file are represented by chunks that show lines that are added or deleted between the versions.
Each chunk has a header with a leading and trailing "@@". The header shows the line numbers and sizes of the chunk. The header is followed by the surrounding lines of the changes and the lines that were deleted or added by the change. Deleted lines have a minus sign in the first column. Added lines have a plus sign in the first column. Unchanged context lines have a leading space.
The example on the left has two changes represented in three chunks.
Line number 68264 was deleted in the first chunk.
Line numbers 120673-120675 were joined together into a single line and moved up to line 120651. The second chunk shows the insertion of the new merged line. The third chunk shows the deletion of the two old lines.
The before and after line numbers of the second chunk are different because of the deleted line in the first chunk. They are the same in the third chunk because the second chunk added a new merged line.
The old and new chunk sizes reflect whether lines were added, deleted or both within the chunk.
A technical description of the Unified Diff format is available at:
https://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html
Sometimes you will have changes for more than one commit in your staged changes. In the top illustration to the left, the commit is to be changing the instances where an SFM is followed by two spaces instead of one.
There was also a a gloss (\ge mole) that was misplaced. It was at the entry level (after the \lx marker) instead of in the sense (after the \ps).
To remove the gloss edit from the commit, i.e., to unstage it, select the affected lines in the list of staged changes. If you right click the selected lines, a menu item will appear. You can unstage those lines, or the entire hunk from the commit.
You can also do the opposite. You can stage a change and leave other changes unstaged. Highlight the lines from the Unstaged area and right click to select the menu item to stage just that change to the commit. That's what's happening in the bottom illustration to the left.