John Wachira
Batch Howtos
- Batch Check for Empty Variables
- Batch File Remove X Characters of a File Name
- Batch File to Loop Through Files in Subdirectories
- Check if a Specified Environmental Variable Contains a Substring
- Create a Shortcut for a Batch File
- Get the Current Batch File Directory
- Stop a Running Process From a Batch File
PowerShell Howtos
- Copy and Paste From a Variable in PowerShell
- Create an Empty Array of Arrays in PowerShell
- Display Current Time Zone in PowerShell
- Find a Specific File by Name Using PowerShell
- PowerShell Extract a Column From a CSV File and Store It in a Variable
- PowerShell Loop Through Files and Folders
- Write Comment-Based Help for PowerShell Scripts
- Check if a File Contains a Specific String Using PowerShell
- Extract a PowerShell Substring From a String
- Get a List of Processes Similar to the Task Manager in PowerShell
- Get Exit Code From Start-Process in PowerShell
- Import Text File and Format and Export It to CSV in PowerShell
- Split Large File in PowerShell
- Use the Get-Clipboard Output in PowerShell
Git Howtos
- Difference Between Forking and Branching on GitHub
- Difference Between Forking and Cloning on GitHub
- Fetch All Branches in Git
- Git Add and Git Commit in One Command
- Git Pull Origin Branch Overwrites Master Branch
- Show Diff Details for Uncommitted Changes in Git
- View Merged and Unmerged Branches in Git
- Add Files to a Git Repository
- Difference Between Git Merge Origin/Master and Git Pull
- Difference Between Git Pull and Git Pull Origin Master
- Download a Specific Tag With Git
- Fix: Git Is Not Recognized as an Internal or External Command Error
- git add, git commit, and git push in One Command
- Move Existing Uncommitted Changes to a New Branch in Git
- Tag an Older Commit in Git
- The Meaning of Fetch_Head in Git
- Undo a Git Pull
- Checkout a Remote Git Branch
- Commit and Push a Single File to the Remote
- Commit Current Changes to a Different Branch in Git
- Difference Between Git Checkout and Git Clone
- Difference Between Git Merge Master and Git Merge Origin/Master
- Difference Between Git Push Origin and Git Push Origin Master
- Exit the Commit Message Editor
- Git Cherry-Pick vs Merge Workflow
- Ignore Everything Except Some Files in Git
- Revert a Git Repository to a Previous Commit
- Add All Files for Commit Except One File
- Clone a Git Repository With a Specific Revision
- Delete Master Branch in Git
- Difference Between the Git Reset, Revert, and Checkout Commands
- Different Ways to Commit Untracked Files in Git
- Make an Initial Push to a Remote Repository With Git
- Make the Development Branch Identical to the Master Branch
- Pull a Specific Folder in Git
- Push a Specific Commit to a Remote Repository
- Check Username and Email Configuration in Git
- Create an Empty Branch on GitHub
- Delete a Commit but Preserve Changes in Git
- Move Git Branch Pointer to Different Commit
- Pull and Update One File in Git
- Revert an Amended Commit in Git
- Various Methods Used to Remove Local Git Changes
- Add a .gitignore File to an Existing Repository
- Get the Name of a Git Repository
- Identify the Recent Common Ancestor for Two Branches in Git
- Ignore Local File Changes in Git
- Modify a Specific Commit in Git
- Restore a Reverted Git Commit
- Revert a Git Merge With Conflicts
- Rollback to an Old Commit in a Public Git Repository
- Resolve Git Status Unmerged Paths
- Clean the Local Working Directory in Git
- Commit Some Files in a Branch and Make Them Available in Another
- Link to an Existing GitHub Repository
- Make a Folder a Git Repo and Push to Remote
- Merge the Development Branch Into Master
- Rebase to a Specific Commit in Git
- Update a Git Clone
- Check Upstream Tracking Git Branches
- Configure Git Credentials to Recall Password and Username
- Copy Changes From One Branch to Another in Git
- Create a Master Branch in a Bare Git Repository
- Display Filenames Changed in All Commits
- Git Rebase Origin/Branch vs. Git Rebase Origin Branch
- Git Search Commit Messages Using Command Line
- Create a Remote Repository From a Local Repository in Git
- Git Pull Not Pulling Everything
- Create a Branch From a Tag in Git
- Create a Git Patch From Uncommitted Changes
- Fork a Repo in GitHub
- List Commits Not Pushed to the Remote Repository in Git
- Open a File on Git Bash
- Show Conflicted Files in Git
- Squash Commits That Are Already Pushed in Git
- Stage Deleted Files in Git
- Stop Tracking a Remote Branch in Git
- Synchronize a Local Repository With a Remote Repository in Git
- Undo the Git add Command
- Add a File to the Last Commit in Git
- Add All Files in a Folder to Commit in Git
- Diff a File to an Arbitrary Version in Git
- Difference Between Git Checkout --Track Origin/Branch and Git Checkout -B Branch Origin/Branch
- Difference Between Git RM --Cached and Git Reset File
- Filter the Commit History in Git
- Find a Deleted File in a Project's Commit History in Git
- Finish a Merge After Resolving Conflicts in Git
- Manage Version Number in Git
- Resolve Git Stash Conflicts Without Commit
- Bower: ENOGIT Git Is Not Installed or Not in the PATH
- Configure Git to Ignore File Mode Changes
- Fatal: Origin Does Not Appear to Be a Git Repository Error in Git
- Fatal: The Current Branch Master Has No Upstream Branch Error in Git
- Fix Another Git Process Seems to Be Running in This Repository Error
- Solve Permission Denied (Publickey) Error in Git
- Configure Git Bash With Visual Studio Code
- Create Groups and Move Projects in GitLab
- Fatal: Refusing to Merge Unrelated Histories Error in Git
- Fatal: The Remote End Hung Up Unexpectedly Error in Git
- Use Git Rebase on the Command Line
- Search for Specific String in the Git Commit History
- Selectively Merge Changes From Different Branches in Git
- Understand the Git Commit Signoff Feature
- Configure a Proxy to Work With Git
- Git HEAD^ vs Git HEAD~ vs Git HEAD{@}
- Git Stash vs Shelve in IntelliJ IDEA
- List Git Submodules
- Set Up Meld as Difftool and Mergetool for Git
- Set Up SourceGear DiffMerge Tool for Git
- Clone a Single Remote Branch in Git
- Export a Git Project
- Move an Existing Tag in Git
- Rename a Git Repository
- Revert a Git Repository by Commit ID
- Merge Files Without Auto Commit in Git
- Undo the Last Commit in a Remote Git Repository
- Clean Up Git Repositories With the Git Prune Command
- Color the Git Console
- Git Push --force-with-lease vs Git Push --force
- Show Staged and Unstaged Changes in Git
- The Git Index.Lock File
- Undo Local Changes to a Single File in Git
- Compare Files, Commits, and Branches in Git
- Merge a Specific Commit in Git
- Push and Track a New Local Git Branch to a Remote Repository
- Undo the Last Git Commit in a Local Repository
- Update a Repository by Setting Up a Remote
- Close the Git Commit Editor on Windows
- Force Git Push to Overwrite Files in Remote Repository
- Ignore Local Changes When Pulling From Remote Repository
- Ignore Untracked Files in Git
- Rename Files and Directories in a Git Repository
- Revert Git Repository to a Previous Commit
- Understand the Git Conflict Markers
- Use Git Diff to Ignore Whitespaces in Git
- Add Files in Git
- Clone Into a Non-Empty Git Directory
- Overwrite Local Changes in Git
- Troubleshoot Git Patch Error
- Use Patch Files in Git
- Delete Local Commits in Git
- Difference Between Git Fetch and Git Pull
- Apply Stashes in Git
- Copy and Paste in Git Bash
- Git Pull Not Updating Files
- Merge Local Branches in Git
- Pull the Latest Git Submodule
- Save Username and Password in Git
- The .git Directory Explained
- Visualize Git Repository
- Create and Use Branches on Git
- Rebase Git Branch
- The Difference Between Git Pull and Git Clone
- Undo Changes in Git
- Commit Changes to a Git Branch
- Undo Git Stash
PHP Howtos
- Convert a PDF Document to a Preview Image in PHP
- Download PDF Files in HTML With PHP
- Magic Quotes in PHP
- Minify HTML Output of the PHP Page
- PHP Conditional Statements
- Set Up PHP-FPM and Nginx Docker Containers
- The PHP shell_exec() and exec() Functions
- Create a PHP Dropdown List
- Create a Zip File in PHP
- PHP Error Handlers
- Push Items to Associative Array in PHP
- Store Div Id in a PHP Variable and Pass It to JavaScript
- isset() vs. empty() Functions in PHP
- Autoload Classes in PHP
- die() and exit() Functions in PHP
- Insert Form Data Using MySQL Table in PHP
- PHP UPDATE Query in a MySQL Table
- array_map and array_walk Functions in PHP
- Constructor in PHP
- String Compare Using == Operator and STRCMP Function in PHP
- Select Count Function From a MySQL Table in PHP
- Format a Number to a Dollar Amount in PHP
Author: John Wachira
John is a Git and PowerShell geek. He uses his expertise in the version control system to help businesses manage their source code. According to him, Shell scripting is the number one choice for automating the management of systems.
LinkedIn