Skip to content
-
Learn Cybersecurity & Ethical Hacking in Nepal with CyberSamir — Start Learning →
Cyber Samir Cyber Samir Cyber Samir

Learn Cybersecurity, Ethical Hacking & Bug Bounty in Nepal

Cyber Samir Cyber Samir Cyber Samir

Learn Cybersecurity, Ethical Hacking & Bug Bounty in Nepal

  • Home
  • About Us
  • Blogs
    • Ethical Hacking
    • Cybersecurity
    • Penetration testing
  • Tools
    • Phishing email Detector tool
    • Website Security Checker Tool
    • Age|Face Shape|Expression Guess
    • Text Cleaner Tool
    • Image Converter & Resizer Tool (Free Online)
  • Contact Us
  • Home
  • About Us
  • Blogs
    • Ethical Hacking
    • Cybersecurity
    • Penetration testing
  • Tools
    • Phishing email Detector tool
    • Website Security Checker Tool
    • Age|Face Shape|Expression Guess
    • Text Cleaner Tool
    • Image Converter & Resizer Tool (Free Online)
  • Contact Us
Close

Search

Subscribe
  • Facebook
  • Telegram
  • Instagram
  • Youtube
  • Linkedin
  • Whasapp
Cyber Samir Cyber Samir Cyber Samir

Learn Cybersecurity, Ethical Hacking & Bug Bounty in Nepal

Cyber Samir Cyber Samir Cyber Samir

Learn Cybersecurity, Ethical Hacking & Bug Bounty in Nepal

  • Home
  • About Us
  • Blogs
    • Ethical Hacking
    • Cybersecurity
    • Penetration testing
  • Tools
    • Phishing email Detector tool
    • Website Security Checker Tool
    • Age|Face Shape|Expression Guess
    • Text Cleaner Tool
    • Image Converter & Resizer Tool (Free Online)
  • Contact Us
  • Home
  • About Us
  • Blogs
    • Ethical Hacking
    • Cybersecurity
    • Penetration testing
  • Tools
    • Phishing email Detector tool
    • Website Security Checker Tool
    • Age|Face Shape|Expression Guess
    • Text Cleaner Tool
    • Image Converter & Resizer Tool (Free Online)
  • Contact Us
Close

Search

Subscribe
  • Facebook
  • Telegram
  • Instagram
  • Youtube
  • Linkedin
  • Whasapp
Blog

Git Commands Cheatsheet for WordPress Development

By cybersamir
March 30, 2025 3 Min Read
Comments Off on Git Commands Cheatsheet for WordPress Development

Git Commands Cheatsheet for WordPress Development

A comprehensive reference for Git commands commonly used in WordPress development workflows

Basics
Branches
Remote
WordPress Specific
Workflow

Setup & Configuration

git config –global user.name “Your Name”
Set the name that will be attached to your commits
git config –global user.email “your.email@example.com”
Set the email that will be attached to your commits
git config –list
List all configuration settings
git init
Initialize a new Git repository in the current directory
git clone [url]
Clone a repository from a remote URL

Basic Commands

git status
Show the status of files in the working directory
git add [file]
Add a file to the staging area
git add .
Add all modified and new files to the staging area
git commit -m “Commit message”
Commit staged changes with a message
git log
Show commit history
git diff
Show changes between working directory and staging area
git diff –staged
Show changes between staging area and last commit

Branch Management

git branch
List all local branches
git branch -a
List all local and remote branches
git branch [branch-name]
Create a new branch
git checkout [branch-name]
Switch to a branch
git checkout -b [branch-name]
Create a new branch and switch to it
git merge [branch-name]
Merge a branch into the current branch
git branch -d [branch-name]
Delete a branch
git branch -D [branch-name]
Force delete a branch

Stashing

git stash
Stash changes in a dirty working directory
git stash list
List all stashed changesets
git stash apply
Apply the most recent stash
git stash apply stash@{n}
Apply a specific stash
git stash drop
Remove the most recent stash
git stash pop
Apply and remove the most recent stash

Remote Operations

git remote
List all remote repositories
git remote -v
List all remote repositories with URLs
git remote add [name] [url]
Add a new remote repository
git remote remove [name]
Remove a remote repository
git fetch [remote]
Download objects and refs from a remote
git pull
Fetch and merge changes from remote to current branch
git pull –rebase
Fetch and rebase changes from remote to current branch
git push [remote] [branch]
Push local branch to remote repository
git push -u origin [branch]
Push and set upstream for a branch
git push –tags
Push tags to remote repository

WordPress-Specific Git Strategies

git clone https://github.com/WordPress/WordPress.git
Clone the WordPress core repository
git checkout -b theme-feature
Create a branch for a new theme feature
git checkout -b plugin-bugfix
Create a branch for plugin bug fixes
git add wp-content/themes/your-theme/
Add changes from a specific theme directory
git add wp-content/plugins/your-plugin/
Add changes from a specific plugin directory

WordPress .gitignore Recommendations

# WordPress core (if not managing core with Git) wp-admin/ wp-includes/ # Configuration files wp-config.php .htaccess # User uploads wp-content/uploads/ # Cache files wp-content/cache/ # Logs *.log # Plugins (if not managing plugins with Git) # wp-content/plugins/ # Themes (if not managing themes with Git) # wp-content/themes/ # Node modules and other build tools node_modules/ bower_components/ .sass-cache/
Common WordPress .gitignore entries (customize based on your workflow)

Common Development Workflows

Feature Branch Workflow
1. git checkout -b feature/name
2. Make changes and test
3. git add .
4. git commit -m "Add feature X"
5. git push -u origin feature/name
6. Create Pull Request
7. After review: git checkout main && git pull && git merge feature/name
Hotfix Workflow
1. git checkout main
2. git checkout -b hotfix/issue
3. Fix issue and test
4. git add .
5. git commit -m "Fix critical issue X"
6. git push -u origin hotfix/issue
7. Create Pull Request
8. After review: git checkout main && git pull && git merge hotfix/issue
Release Workflow
1. git checkout main
2. git checkout -b release/1.0.0
3. Make version changes
4. git add .
5. git commit -m "Prepare for v1.0.0 release"
6. git tag -a v1.0.0 -m "Version 1.0.0"
7. git push origin release/1.0.0 --tags
8. Create Pull Request
9. After review: git checkout main && git merge release/1.0.0 && git push

Advanced Commands

git rebase [branch]
Reapply commits on top of another branch
git rebase -i HEAD~[n]
Interactive rebase to edit the last n commits
git cherry-pick [commit-hash]
Apply the changes of a specific commit to current branch
git reset –hard [commit]
Reset to a specific commit, discarding all changes
git clean -fd
Remove untracked files and directories
git bisect start
Start a binary search to find which commit introduced a bug
git worktree add [path] [branch]
Add a new working tree associated with the repository

Tags:

2025 guidedeveloper toolsgit cheatsheetgit commandsgit for wordpressgit tutorialgit workflowversion controlweb developmentwordpress development
Author

cybersamir

Follow Me
Other Articles
Aircrack-ng cheat sheet for WiFi security testing
Previous

Aircrack-ng Cheat Sheet

Next

How to Use Burp Suite Like a Pro

Your ad here

300 x 250 banner slot

Reach Nepali students, developers, and security learners reading about ethical hacking, CTFs, and cyber news.

Book on WhatsApp Or send an email

Sponsors: VPNs, courses, hosting, security tools

Recent Posts

  • How to Recover Money from Online Scam Nepal: 2026 Guide
  • How to Check If Your Data Was Leaked (Nepal 2026 Guide)
  • Is PHP Dead? A 2026 Reckoning
  • Nepal Cyber Shield CTF: Top 10 Teams Qualified for the Grand Finale
  • How to Report Cybercrime in Nepal: Step-by-Step Guide (2026)

Nepal Cyber Shield 2026

Been scammed or hacked?

Act fast: save screenshots, don't delete chats, and report it.

  • 100 Nepal Police emergency line
  • +9779851286770 Nepal Police Cyber Bureau
Report here (Nepal Police) Read the step-by-step reporting guide

Money lost? Call your bank first so they can try to freeze the transfer.

Categories

  • Awareness
  • Blog
  • Career & Learning
  • Cybersecurity
  • Ethical Hacking
  • Nepal Tech & Digital Safety
  • News
  • Penetration testing
  • Tools & Reviews

Latest security alerts

  • 3 Winning Moves to Grow MSSP Profits and Keep SOC Costs Under Control
  • ARTEX AI Hacking Tool Used by Cybercriminals Can Be Hacked by Its Own Targets
  • New Protopterus Windows Spyware Found Targeting Families of Azerbaijani Political Prisoners
  • USB2Shell Linux Kernel Flaw Lets Malicious USB Devices Gain Root Access Without Login
  • Hackers Breach Canada's Military Export Permit System in Suspected AI-Assisted Attack
  • PHP Vulnerability And Global Cybersecurity - The Rising Nepal
  • Nepal's digital vulnerability goes beyond PHP - myRepublica
  • SEBON introduces IT policy to strengthen cybersecurity in Nepal’s capital market - OnlineKhabar English News
  • From heartbleed to PHP2Shell: Is Nepal ready for the next cyber crisis? - The Annapurna Express
  • SEBON steps up effort to prevent cyber attacks in stock exchange platform - myRepublica

You May Have Missed

how to recover money from online scam Nepal
Awareness

How to Recover Money from Online Scam Nepal: 2026 Guide

cybersamir
By cybersamir
November 28, 2026
data leak check nepal
Awareness

How to Check If Your Data Was Leaked (Nepal 2026 Guide)

cybersamir
By cybersamir
November 26, 2026
Cinematic PHP programming thumbnail with the headline “Is PHP Dead? 2026 Reckoning,” a glowing blue PHP elephant, and CyberSamir branding.
Awareness

Is PHP Dead? A 2026 Reckoning

cybersamir
By cybersamir
October 25, 2026
ctf top 10 selected teams
News

Nepal Cyber Shield CTF: Top 10 Teams Qualified for the Grand Finale

cybersamir
By cybersamir
October 4, 2026
How to report cybercrime in Nepal Cyber Bureau complaint guide
Awareness

How to Report Cybercrime in Nepal: Step-by-Step Guide (2026)

cybersamir
By cybersamir
September 27, 2026
Nepal Data Breach: 462,600 Citizens' IDs Allegedly Leaked," subtext "Dark web forum post claims mass PII theft from a .gov.np portal
News

Nepal Government Portal Allegedly Breached: 462,600 Citizens’ Data Reportedly Listed for Sale on Dark Web

cybersamir
By cybersamir
September 24, 2026
Cybersecurity

Top 10 Security Mistakes Nepali Websites Still Make in 2026

cybersamir
By cybersamir
September 23, 2026
News Cybersecurity

Nepal Data Hub Ransomware Attack: NEPSE Shutdown Explained

cybersamir
By cybersamir
September 23, 2026
News

Nepal Cyber Shield 2026: Everything You Need to Know About Nepal’s National CTF Championship

cybersamir
By cybersamir
September 19, 2026
CS

CYBERSAMIR

Explore. Hack. Secure. Learn.

About Us

CyberSamir provides cutting-edge insights into ethical hacking, penetration testing, and cybersecurity defense strategies for professionals and enthusiasts alike.

500+ Articles
15K+ Members
30+ Tools

Resources

  • Tutorials
  • Our Services
  • Tools
  • CTF Walkthroughs
  • Security News

Community

  • WhatsApp Group
  • Discord Server
  • Telegram Group
  • Upcoming Events
  • Certifications

Follow Us

Cyber Security Events Worldwide

© CyberSamir. All Rights Reserved.

Copyright 2026 — Cyber Samir. All rights reserved. Blogsy WordPress Theme