Use your know GIT skillz
A few days ago I had that situation were I’m accidentally commited and pushed changes in the wrong branch. Directly in that moment a few questions run through my head: “How to revert that?”, “Is there an easy way?”, “Are my current GIT skillz enough?” and “Why I’m so stoopid?*”
After fighting with those questions I had an easy solution for my problem:
- In my case, I wanted to keep my changes, so I
git checkout -b my-changesa new branch.
git cherry-pick accident-commit-hashthe changes from the branch I accidently commited in.
- Than I
git checkout accident-branchagain and
git reset --hard commit-hashthe branch to the commit before.
- After fixing my local branch, I also needed to fix the remote branch, so I
git push --force origin accident-branchto solve also that problem.
After those four easy steps everything was fixed & clean again - Hooah! :)
*That’s part of one of my favorite Arnold quotes: You are stoopid!
Some domain providers have this annoying default TTL (30 minutes) for DNS zone file changes, so I wrote a simple Ruby script that checks for me every minute if the given domain is now published and reachable. Here is the Gist code of that script:
Be careful, it’s super simple! ;)