Category: git

Gitting around git issues

Sometimes I have a plugin in version control, for reasons of naming or maintenance, or whatever, and I forget that and use WP to update the plugin. Here’s how to fix it quickly on the remote site:

git fetch --all
git reset --hard origin/master

Untracking tricksy files from git repos

# Do this on all machines
echo "FILE_NAME" >> .gitignore
git rm --cached FILE_NAME
git add -u
git commit -m "removing files from version control"
# Sync with your git server, pull to sync and push to register your local change
git pull
git push

Source