Tag: Command Line

Browse all articles, tutorials, and guides about Command Line

Guides

Posts

Linux
2024-12-15|5 min read

How to Check Which Process is Using a Specific Port from Command Line

Learn how to identify which processes are listening on specific ports using netstat, lsof, and ss commands across different operating systems.

Linux
2024-12-15|7 min read

How to Find Files Containing Specific Text on Linux

Need to locate files with specific content? Learn how to use grep, find, and other Linux tools to search through files and directories efficiently.

Git
2024-12-15|5 min read

How to Reset Local Git Branch to Match Remote Repository HEAD

Learn different methods to reset your local Git branch to exactly match the remote repository HEAD, including hard reset, fetch and reset, and when to use each approach safely.

Git
2024-12-14|5 min read

How to Reset or Revert a File to a Specific Revision in Git

Learn multiple ways to reset or revert a specific file to a previous version in Git, including using git checkout, git restore, and git show commands with practical examples.

Git
2024-12-13|5 min read

How to Push a New Local Branch to Remote Git Repository and Track It

Learn how to push a new local Git branch to a remote repository and set up tracking, including different methods for initial push, setting upstream branches, and managing branch relationships.

Git
2024-12-12|5 min read

How to Revert Git Repository to a Previous Commit Safely

Learn multiple safe methods to revert your Git repository to a previous commit, including using git revert, git reset, and git checkout with practical examples and safety considerations.

Git
2024-12-10|7 min read

How to Undo the Most Recent Local Commits in Git

Learn different ways to undo recent Git commits using reset, revert, and rebase commands. Understand when to use each method safely.

Linux
2024-12-08|6 min read

How to Count Number of Lines in Files Using Linux Terminal

Learn different methods to count lines in text files like CSV, TXT, and other non-binary files using wc, awk, sed, and other Linux command-line tools.

Git
2024-12-08|6 min

How to Delete a Git Branch Locally and Remotely

Learn how to safely delete Git branches both on your local machine and remote repositories using different Git commands and safety checks.

Git
2024-12-05|8 min

What is the Difference Between Git Pull and Git Fetch?

Understand when to use git pull versus git fetch, how they affect your local repository, and which command is safer for different workflows.

Linux
2024-12-05|5 min read

How to Use Grep to Show Only Filenames on Linux

Learn how to use grep options to display only the names of files containing matches, making it easier to identify relevant files in large searches.

Git
2024-12-02|5 min read

How to Rename a Local Git Branch

Learn how to rename Git branches locally using git branch -m, handle the current branch, and update remote tracking references safely.

Git
2024-12-01|7 min read

How to Reset Git to a Previous Commit

Learn different ways to reset your Git repository to a previous commit state. Understand the differences between soft, mixed, and hard resets and when to use each approach.

Linux
2024-11-30|6 min read

How to Recursively Grep All Directories and Subdirectories

Learn how to use grep with recursive options to search through entire directory trees efficiently, including advanced filtering and performance optimization techniques.

Git
2024-11-28|6 min read

How to Undo Git Add Before Commit

Learn how to unstage files that you've added to Git's staging area using git reset, git restore, and other methods before committing.

Git
2024-11-25|7 min

How to Force Git Pull to Overwrite Local Files

Learn how to use git reset, git clean, and git checkout to force git pull to overwrite local changes when you need to match the remote repository exactly.

Git
2024-11-22|6 min

How to Check Out a Remote Git Branch

Learn different methods to check out remote Git branches locally using git checkout, git switch, and git fetch commands with practical examples.

Git
2024-11-16|6 min read

How to Remove Local Untracked Files from Git Working Tree

Learn how to use git clean to remove untracked files and directories from your Git working tree safely with different options and safety checks.

Networking
2024-09-01|7 min read

How to Get Your Local IP Address

Learn multiple methods to find your local IP address using command line tools, programming languages, and system utilities across different operating systems.