How to use if-then statement in Bash scripting
Updated: Jan 28, 2024
Introduction Bash scripting is a powerful tool for automating tasks in Linux and Unix-like operating systems. One of the fundamental concepts in any programming language, including Bash, is the ability to make decisions based on......
How to use ‘do-while’ loop in Bash scripting
Updated: Jan 28, 2024
Introduction Bash scripting offers multiple ways to perform repetitive tasks, amongst which while and until loops are quite common. However, sometimes programmers from other languages like C or Java search for the do-while loop in Bash......
Ubuntu: How to Ping a Remote Server/IP Address
Updated: Jan 28, 2024
Introduction Pinging is a fundamental network command used to test the reachability of a host on an Internet Protocol (IP) network and measure the round-trip time for messages sent from the originating host to a destination computer.......
How to check shell history in Ubuntu
Updated: Jan 28, 2024
Introduction Checking the shell history in Ubuntu can be quite useful for recalling commands, learning user activity, and for general system administration tasks. The shell or command line records a list of commands that users have......
Shell Scripting in Ubuntu: The Comprehensive Cheat Sheet
Updated: Jan 28, 2024
Introduction Shell scripting in Ubuntu allows automation of repetitive tasks, improves productivity, and enhances the functionality of the system. This comprehensive guide is designed to introduce you to shell scripting from......
How to Fetch/Pull All Git Branches
Updated: Jan 28, 2024
Introduction Effective version control is essential in a collaborative software development environment, and Git is one of the most popular version control systems among developers. Working with branches is a fundamental aspect of......
How to tweak Git commit timestamps (author and committer dates)
Updated: Jan 28, 2024
Introduction Git is a distributed version control system widely used for tracking changes in source code during software development. While Git keeps thorough records, including timestamps for when commits are made, there are instances......
How to undo ‘git rebase’ (with examples)
Updated: Jan 28, 2024
Dealing with git rebase can be a daunting task for developers, particularly when something goes wrong. Whether you’ve rebased unintentionally, encountered conflicts, or simply want to revert to a previous state, understanding how to......
Git Post-Receive Hook: A Practical Guide (with Examples)
Updated: Jan 28, 2024
Introduction Git hooks are powerful tools that can be used to automate tasks and enhance your workflow. Specifically, a post-receive hook in Git is a script that runs on the server-side after a successful push action. This guide will......
Git Pre-Rebase Hook: A Practical Guide (with Examples)
Updated: Jan 28, 2024
Overview Rebasing is a powerful feature of Git that allows developers to integrate changes from one branch into another, providing a cleaner, linear history. However, it can be dangerous if not managed carefully. This is where the......
Git Pre-Commit Hook: A Practical Guide (with Examples)
Updated: Jan 28, 2024
Introduction Git hooks are scripts that Git executes before or after events such as: commit, push, and receive. A pre-commit hook is a type of hook that is run before a commit is finalized. These hooks can be used to inspect the......
Git: How to ignore file mode (chmod) changes
Updated: Jan 28, 2024
Introduction Understanding how to configure Git to ignore file mode (chmod) changes is essential for developers working across different operating systems or in a collaborative environment with varying file permissions requirements.......