Git tips: git xpush

I'd recently been suffering from builds failing because people (including myself) had been pushing changes that they hadn't run tests on, or where un-pulled changes had broken their code.

As we use Maven, there's a simple solution to this, git aliases.

You can add the following to ~/.gitignore:

[alias]
	xpush = !sh -c 'git pull --no-edit && mvn clean install && git push'

Now, when you do "git xpush" git pulls any new changes down, rebuilds the app (running the tests) and pushes the changes to the repo.

Tags

ant (2)   antlr (1)   applet (1)   apsectj (1)   asm (1)   aspectj (1)   bdd (1)   blog (1)   cd (1)   coldfusion (2)   concurrency (4)   cucumber (1)   dashing (1)   docker (3)   drop-wizard (1)   drupal (1)   dsl (1)   gatling (1)   geb (1)   gist (13)   git (1)   graphite (1)   groovy (2)   hibernate (2)   ioc (1)   java (44)   java-8 (1)   java-fx (1)   jmeter (2)   jpa (2)   junit (5)   links (12)   maven (12)   middleman (2)   mocking (1)   mongodb (1)   oped (9)   os-x (1)   performance (4)   photos (1)   plaf (14)   ruby (3)   scala (1)   selenium (4)   software (10)   spring (5)   spring-mvc (1)   swing (15)   testing (17)   tips (4)   tomcat (3)   tuples (1)   tutorial (1)   unix (6)   vagrant (2)   web (4)   windows (1)