#

scripting

Scripting with Git commands

ProgrammingGit: List Files in Last Commit Only (No Diffs)

View only files changed in the last Git commit without diffs using git show --name-only or git diff --name-only HEAD~1 HEAD. Perfect for git show files, git diff files, git list files in scripts or quick audits—no patch details shown.

1 answer 2 views
ProgrammingHow to Check Python Version in Scripts: Complete Guide

Learn how to check Python version programmatically using sys and platform modules. Discover methods to print, compare, and use version info in your scripts.

1 answer 2 views
OSBatch File Variable Empty? Fix CMD Set Spaces Issue

Why is your batch file variable empty when echoed? Fix CMD set spaces around = with set "var=value". Windows batch variable best practices, quotes, paths, and common pitfalls explained.

1 answer 1 view
ProgrammingFix PowerShell Array Sorting: Numeric Sort for Nested Arrays

Learn how to fix PowerShell's incorrect sorting behavior for nested integer arrays. Discover workarounds using script blocks, type casting, and best practices for proper numeric sorting.

1 answer 2 views
DevOpsPowerShell Invoke-Command: Escape Single Quotes for bpflist

How to escape single quotes in PowerShell Invoke-Command ScriptBlock for NetBackup bpflist -pattern. Includes backtick escaping, $using:, and -ArgumentList

1 answer 3 views
ProgrammingAppleScript Object Specifier for Shared Cocoa Objects

Assign stable UUIDs, expose an app-level resolver, and return NSUniqueIDSpecifier so AppleScript recognizes shared Cocoa objects as identical. Fast and stable.

1 answer 1 view
ProgrammingWhy Git disallows --detach with --orphan (detached HEAD)

Why Git forbids --detach with --orphan, how to detach HEAD by using git checkout on an orphan commit SHA, and scripting patterns to handle orphan branches.

1 answer 1 view