-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathGit-Alias.ps1
More file actions
36 lines (22 loc) · 847 Bytes
/
Copy pathGit-Alias.ps1
File metadata and controls
36 lines (22 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Set-Alias gtb GitGetActiveBarnch -Scope Global
Set-Alias gtbl GitGetBarnches -Scope Global
Set-Alias gtbn GitNewBranch -Scope Global
Set-Alias gtbm GitMoveToBranch -Scope Global
Set-Alias gtm GitMerge -Scope Global
Set-Alias gta GitAddToBranch -Scope Global
Set-Alias gtc GitCommit -Scope Global
Set-Alias gtca GitCommitAll -Scope Global
Set-Alias gtcm GitCommitAmend -Scope Global
Set-Alias gts GitStatus -Scope Global
Set-Alias gtr GitReflog -Scope Global
$gitFnNames = "gt"
function GitFunctions(){
$fName, $rest = $args
Write-Debug "Execute function:'$fName' Args:'$rest'"
$gitAliases = Get-Alias -Definition "*git*" | where Name -like "${gitFnNames}*"
$gitAliases| out-string | Write-Debug
$f = $gitAliases | where Name -like "${gitFnNames}${fName}"
Write-Debug $f
. $f $rest
}
Set-Alias g GitFunctions -Scope Global