Tuesday, April 21, 2020

Setting Beyond Compare as the default diff tool in Sourcetree

When you right click on a file that has changed in the Unstaged file panel of Sourcetree, you have an "External Diff" option. This post indicates that Sourcetree uses "whatever you have configured in your .gitconfig already as your default diff tool"

You can set Beyond Compare as your default diff tool by following the instructions posted here.

Diff
At a Windows command prompt, enter the commands:
  git config --global diff.tool bc
  git config --global difftool.bc.path "c:/Program Files (x86)/Beyond Compare 4/bcomp.exe"

Note: For Git versions older than 2.2 (git --version) replace "bc" with "bc3" in the above instructions.

3-way Merge Pro only

At a Windows command prompt, enter the commands:
  git config --global merge.tool bc
  git config --global mergetool.bc.path "c:/Program Files (x86)/Beyond Compare 4/bcomp.exe"

Note: For Git versions older than 2.2.0 (git --version) replace "bc" with "bc3" in the above instructions.

Launching Diffs and Merges

File Diff:
  git difftool filename.ext
Folder Diff:
  git difftool --dir-diff
3-way Merge:
  git mergetool filename.txt

Advanced Settings

To disable the "Launch 'bc3' [Y/n]?" prompt, run the command:
  git config --global difftool.prompt false
Git's default settings retain merge files with *.orig extensions after a successful merge.  To disable this safety feature and automatically delete *.orig files after a merge, run the command:
  git config --global mergetool.keepBackup false

Running the following command will open your .gitconfig file in an editor.
git config --edit --global

You will be able to see what the command did to edit your .gitconfig file.


Friday, April 17, 2020

How to schedule Windows Update installations in Windows 10 Pro


From https://www.windowscentral.com/how-schedule-windows-updates-windows-10


How to schedule Windows Updates
1. Launch Local Group Policy Editor
Type (or copy/paste) gpedit.msc into the Cortana/search bar or use Win + R and paste in gpedit.msc into the Run entry box

2. Navigate
Using the Local Group Policy Editor navigate to Computer Configuration\Administrative Templates\Windows Components\Windows Update

3. Double-Click
Double-Click Configure Automatic Updates to open the configuration window

4. Choose your destiny
The console is quite clear on what are your choices. These were detailed above in the prelude section. First you need to choose Enabled in the upper left corner as it is Not Configured by default. Once Enabled the Options section becomes active. You can now choose which policy you want to enable.

5. Date Time
If you are using option #4, you can also select the day and exact time you want the updates installed. Note that the time and day options are only applicable to option #4 as the other options are just notifications for installations. Once completed you can hit Apply to make sure the setting takes and then hit OK to exit the window.