To checkout a remote branch in Git, first of all it is required to figure out what branches exist on a remote Git repository. By default, the git branch command lists the local branches only. In this short note i’ll show how to list only remote branches in Git and also how to list all […]
“You are in ‘detached HEAD’ state” is not an error message and is nothing to be worried about. This state means you are no longer on a branch, and it happens when an arbitrary commit is checked out instead of a branch. If this state was unintentional and you want to “fix” the ‘detached HEAD’, […]
While troubleshooting an issue that causes an unexpected reboot or shutdown of a Windows machine, it is important to know which event IDs are related to system reboot/shutdown and how to find the appropriate logs. In this note i am publishing all the event IDs related to reboots/shutdowns. I am also showing how to display […]
In Oracle, it is possible to get a database server host name using a simple SQL query. In this note i will show how to SELECT the Oracle database server host name you’re currently connected to, using the SQL query that doesn’t require any special permissions. I will also show how to get the database […]
Tables are the basic unit of data storage in Oracle databases. In this note i will show how to list all tables in an Oracle database (equivalent to SHOW TABLES command in MySQL) using the command-line interface of SQL*Plus. I will also show how to list only tables owned by the current user, show the […]
Oracle has no databases but schemas and users (that are essentially the same thing). The schema/user in Oracle can be considered as an equivalent to a “database” concept in MySQL, PostgreSQL or MS SQL. In this note i will show how to list all Oracle “databases” (equivalent to SHOW DATABASES command in MySQL), get the […]
Some scripts or commands executed in Windows PowerShell or CMD may ask interactive questions that have to be responded with “Yes” or “No” answers. To know how to answer these interactive questions automatically is very handy for different automations. In this note i will show how to respond “Yes” or “No” to prompts in Windows […]
For better readability it is convenient to split long commands over multiple lines. In Windows PowerShell a multi-line command can be created from a long command by splitting it using the backquote character. In this note i will show an example of how to split a long command over multiple lines in PowerShell.
The Get-History command in PowerShell lists only the commands entered during the current session. To get the list of all previously executed commands it is required to locate the file where these commands are stored. In this note i will show how to locate the history file and list all commands executed previously in PowerShell.
Tags in Git are used to label specific commits (to mark releases, for example). In this note i will show how to create a Git tag and push it remote repository using the git tag and git push commands. I will also show how to find out the most recent tag name and how many […]