How to add environment variables in Mac OS X

Adding here for reference (tried this in Mac OS X Mojave): # To set an environment variable, enter the following command: launchctl setenv variable "value" # To find out if an environment variable is set, use the following command: launchctl getenv variable # To clear an environment variable, use...

Git: Command to fix corrupted repository

I occasionally get fatal, such as: error: cannot lock ref 'refs/remotes/origin/AB-123': is at dffbe642f088781a5e485227927e141ddb73443a but expected e377921a6d00f4d4c0463774990e03343683177e Rebasing doesn’t work, but if you do the following it will resolve it: git gc --prune=now This guarantees to remove all git garbage. NOTE: Make sure all your code has been committed...

Git How-To: Squash commits in one line

Adding this here in case I need to refer to it in the future. git reset --soft HEAD~3 && git commit Where ~3 means squashing last 3 commits into one....

My Jacoco Maven Plugin POM config

Adding it here so I can refer to it in the future. <jacoco.version>0.8.2</jacoco.version>         <min.branch.coverage>0.95</min.branch.coverage>         <min.line.coverage>0.95</min.line.coverage> <plugin>                 <groupId>org.jacoco</groupId>                 <artifactId>jacoco-maven-plugin</artifactId>                 <version>${jacoco.version}</version>                 <executions>                     <execution>                         <id>default-agent</id>                         <goals>                             <goal>prepare-agent</goal>                         </goals>                     </execution>                     <execution>                         <id>default-report</id>                         <goals>                             <goal>report</goal>                         </goals>                     </execution>                     <execution>                         <id>default-check</id>                         <goals>                             <goal>check</goal>                         </goals>                         <configuration>                             <rules>                                 <rule implementation="org.jacoco.maven.RuleConfiguration">                                     <element>BUNDLE</element>                                     <limits>                                         <limit implementation="org.jacoco.report.check.Limit">                                             <counter>BRANCH</counter>                                             <value>COVEREDRATIO</value>                                             <minimum>${min.branch.coverage}</minimum>                                         </limit>...