This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# disallows rebasing on different branch only | |
if [ ! -z $2 ]; then | |
echo "pre-rebase: Rebasing is dangerous, follow the golden rules of rebasing." | |
exit 1 | |
else | |
echo "pre-rebase: Be careful of what you do" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Disallow all rebasing | |
echo "pre-rebase: Rebasing is dangerous, follow the golden rules of rebasing." | |
exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, os, re | |
from subprocess import check_output | |
# Collect the parameters | |
previous_head = sys.argv[1] | |
new_head = sys.argv[2] | |
is_branch_checkout = sys.argv[3] | |
if is_branch_checkout == "0": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import smtplib | |
from email.mime.text import MIMEText | |
from subprocess import check_output | |
# Get the git log --stat entry of the new commit | |
log = check_output(['git', 'log', '-1', '--stat', 'HEAD']) | |
# Create a plaintext email message | |
msg = MIMEText("Look, I'm actually doing some work:\n\n%s" % log) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, os, re | |
from subprocess import check_output | |
# Collect the parameters | |
commit_msg_filepath = sys.argv[1] | |
# Figure out which branch we're on | |
branch = check_output(['git', 'symbolic-ref', '--short', 'HEAD']).strip() | |
print "commit-msg: On branch '%s'" % branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, os, re | |
from subprocess import check_output | |
# Collect the parameters | |
commit_msg_filepath = sys.argv[1] | |
if len(sys.argv) > 2: | |
commit_type = sys.argv[2] | |
else: | |
commit_type = '' | |
if len(sys.argv) > 3: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
if git rev-parse --verify HEAD >/dev/null 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
liquibase | |
--driver=com.microsoft.sqlserver.jdbc.SQLServerDriver | |
--classpath="C:\\Program Files\\Microsoft JDBC Driver 6.0 for SQL Server\\sqljdbc_6.0\\enu\\jre8\\sqljdbc42.jar" | |
--url="jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks2017;integratedSecurity=false;" | |
--changeLogFile="D:\Source\generateChangeLog.xml" | |
--username=liquibase | |
--password=liquibase@123 | |
--logLevel=info | |
rollback rollbackToDate 2019-03-09 00:40:30.617 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- liquibase formatted sql | |
-- changeset mohitgoyal:20190309122800 | |
CREATE TABLE [dbo].[CustomerDetails5]( | |
[CustomerTypeID] [nchar](10) NULL, | |
[CustomerDesc] [nvarchar](max) NULL, | |
[CustomerAddress] [varchar](255) NULL | |
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] | |
--rollback DROP TABLE [dbo].[CustomerDetails5] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- liquibase formatted sql | |
-- changeset mohitgoyal:20190309122800 | |
CREATE TABLE [AdventureWorks2017].[dbo].[CustomerDetails5]( | |
[CustomerTypeID] [nchar](10) NULL, | |
[CustomerDesc] [nvarchar](max) NULL, | |
[CustomerAddress] [varchar](255) NULL | |
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] | |
--rollback drop table CustomerDetails5 |