Using “git push --force” is really evil. You force your current state of a local branch upon the remote branch, no matter what. Even if some commit got pushed right before your force push, it would be overwritten without any notice at all! Unfortunately with a rebasing strategy you can not avoid it.
Frequently I am working on a large commit having many changed files or running a precarious debug session or time consuming test. But some other urgent task comes by forcing me to switch branches. Today I was running a time consuming test so I had enough time to investigate out how I could update another branch and push a commit to origin.
Sometimes I get a very worried person at my desk, thinking he just screwed up bigtime and lost some important commit he made. When you think your work has been lost for good due to some git commands you executed, think again! Git tracks everything and actually never really loses a commit…
A while ago someone notified me that my website had broken by a change I made. “I got a tip for you! You should check it out with git bisect” and so I did. It was great to learn such a nifty feature of git. I shared my experience with some other git users but none of them knew about git bisect.
By default almost everyone is using “git pull” to update their local branch. When someone has forced pushed the result of a rebased to a repository, executing a simple “git pull” will often give you merge conflicts. What is going on and how should you get to the latest truth to continue working?
In the .NET Framework using reflection was always a bit cool when you needed it to solve a problem. Of course you have the performance penalty in mind when using it. Querying objects at runtime and even call properties and execute methods on that object, that’s awesome! But what about having an interface that answers those queries?
I am working on a windows laptop, so getting jekyll to work correctly seems to be troublesome. So before pushing changes to my repository, I would like to check them on a jekyll docker image running on my NAS. Using the “git format-patch” command, we export out commits and apply them on our jekyll docker image to build and html-proof our site.