Posts

Git-Log or Git Graph in Visual Studio Code

Image
$ git log --oneline --all --graph I am working on a tutorial project where I would teach my readers how to code in languages that are available by default in the Windows operating system. We have quite a few of them, and I have decided to start with JScript/ES3. The figure below displays the commit history of the cvmd2html.wsh.js project as displayed by the Git Graph extension in VS Code. I access it from the Status Bar (the blue bar at the bottom of the figure). This view is not default. I deselected the Author and Date properties so that the view matches the outcome of the git-log command at the head of this post. Right-click on the header row to toggle the visibility of the properties' columns. Compare the Git Graph view of the project with the result of executing the git-log command below. The commit hash column is not the last in the commit record row, but it is not important at this stage. I will show the formatting of commit logs in another article. Si

Git-Commit: Reuse Commit Messages

Image
$ git commit --reuse-message <commit> $ git commit -C <commit> I use the above commands to reuse messages from other commits in the next commit. Any symbolic reference (the HEAD pointer, branch names, tags, hashes, or ancestors) can replace the angle brackets placeholder. In this tutorial, I use the long forms of git commands and options for clarity. You might guess it is not how I do it in my terminal shell. 😉 $ git commit --no-edit --amend $ git commit --reuse-message HEAD --amend The two previous commands produce the same outcome. This comparison is to set the --reuse-message as a generalization of the more common option --no-edit . The latter applies only to the current commit or the HEAD pointer, whereas --reuse-message may apply to the next one. For instance, removing the --amend option from the second command causes the creation of another commit with the same message as its precedent. But doing the same on the first command throws an error. $ git commi

Start a Program on the Remote Active Desktop with PowerShell

Image
The goal is to run a command to open a program window like Notepad or Photoshop on a remote computer desktop using PowerShell Remoting . This powerful feature allows us to establish remote sessions, but by default, it only allows executing scripts on the target machine as services . So, the established session is disconnected and not visible to the user watching the remote computer screen. The graphic interfaces of programs started in the session are not visible either. However, we are set in this tutorial to show how to leverage the Task Scheduler to open an application window on a remote desktop and make it visible to the user's eyes. 1. The context In this section, we are opening a program from a PowerShell session, for instance, Notepad. We describe why it is not visible on the remote desktop by default. The commands below open an interactive session with the remote computer identified on the network as inonw-svr . You will notice the chevron arrow pointing to the properti