Use code you find here at your own risk! I am not responsible if you damage your data or system by following any instructions you find here.
- Navigate to your plugin’s root directory:
Bash
<span class="hljs-built_in">cd</span> /home/kupietzc/public_html/kartscode/wp-content/plugins/ktwp-draggable-elements
- Fetch the latest changes from GitHub:
Bashgit fetch origin
- Perform a hard reset to match GitHub’s
main
branch (assumingmain
is your branch):Bash
git reset --hard origin/main
WARNING: This command is destructive. It will discard all local changes to tracked files and make your local repository exactly match your GitHub repository. Ensure you have a backup of any local modifications you wish to preserve that are NOT on GitHub before running this.
- Clean up any untracked files or directories (remnants from manual copying):
Bash
git clean -df
- Verify your repository status:
Bash
git status
Expected Output:
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
After these final steps, your local plugin’s Git repository should be in a clean, synchronized state with GitHub, and your WordPress plugin should be able to perform Git operations without errors.