Skip to content

Commit

Permalink
different solution for ignored pfx files using local alias for git ig…
Browse files Browse the repository at this point in the history
…nore/ignored/unignore see: https://stackoverflow.com/a/18317425/8658213

add the following to your .git/config file
[alias]
	ignore = update-index --assume-unchanged
	unignore = update-index --no-assume-unchanged
	ignored = !git ls-files -v | grep "^[[:lower:]]"
  • Loading branch information
lizbaron committed May 23, 2021
1 parent 5a6239d commit 807770b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
/tSQLtCLR/.vs/tSQLtCLR/v16/Server/sqlite3
/Build_Artifact
/tSQLtCLR/OfficialSigningKey/tSQLtOfficialSigningKey.b64.txt
*.pfx
.DS_Store
/Build_Output
/tSQLtCLR/OfficialSigningKey/KeyInfo.txt
Expand Down
15 changes: 15 additions & 0 deletions Experiments/sqlServerAlias.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# List existing aliases
Get-WmiObject -Namespace 'root\Microsoft\SqlServer\ComputerManagement15' -Class 'SqlServerAlias' |
Format-Table -Property 'AliasName', 'ServerName', 'ProtocolName', 'ConnectionString'

# Delete existing aliases
$alias = Get-WmiObject -namespace 'root\Microsoft\SqlServer\ComputerManagement15' -class 'SqlServerAlias' -filter "AliasName='Dev_tSQLt'"
$alias.Delete()

# Example script to create an alias
$alias = ([wmiclass] '\\.\root\Microsoft\SqlServer\ComputerManagement15:SqlServerAlias').CreateInstance()
$alias.AliasName = 'Dev_tSQLt'
$alias.ConnectionString = '41433' #connection specific parameters depending on the protocol
$alias.ProtocolName = 'tcp'
$alias.ServerName = '810D79BF7E9C'
$alias.Put() | Out-Null;

0 comments on commit 807770b

Please sign in to comment.