Git natively supports Author Date and Committer date for commits. However it is not very easy to detect when commit was actually pushed. Here some discussions about that Well, if you was the developer, who pushed that commit, you can use and get something like So you could get something, but it is difficult to […]
For my git hooks I needed to distinguish if git command was called from console or from UI (Git Extensions), because I wanted to have console prompts in first case, and WPF GUI in second. At some stage we found one very complex implementation which worked fine with cmd, PowerShell, Bash and Git Extensions, but […]
TeamCity has REST api, so it is pretty easy to get the build status from PowerShell. The function implemented with earliest failure detection: build will be considered as broken if either it has be completed as broken or currently running is broken.
Sometime traversing git history, I need to determine what branches were merged at some point. By default git constructs merge commit message by itself. And if nobody changes that it can be parsed to get the merged branch names. Using history of our git repo for last two years, I took all the merge commit […]
I would like to share some useful git snippets, which I’ve used in my git hooks. Snippets originally written in PowerShell but can be easily rewritten for your favorite language. Here are the full sources Get current branch name Safely resolve ref It returns hash of the valid ref, or $null for invalid ones. Test […]
Continuing Useful git hooks – Part 3 Lots of git hooks were written since my last blogpost. I really want to sum up what was done so far. All the hooks are available on BitBucket and GitHub repos We have simple branching model: master represents future releases, at some point we are creating a separate […]
I found some WTF I cannot explain. I have PowerShell 3 installed. But I have ability to run PowerShell 2 host But if I do the same from Cygwin it does not work properly WTF? Why it is still running PowerShell 3 ?!! Moreover, I even tried to call cmd in between The same effect.. […]