fix: add git alias
This commit is contained in:
@@ -40,6 +40,7 @@
|
|||||||
bn = branch --no-merged
|
bn = branch --no-merged
|
||||||
pl = pull
|
pl = pull
|
||||||
pt = push origin --tags
|
pt = push origin --tags
|
||||||
|
ph = push origin HEAD
|
||||||
merge2 = !sh -c '_CURRENT_BRANCH=$(git symbolic-ref --short HEAD) && git checkout $1 && git merge $_CURRENT_BRANCH && git checkout $_CURRENT_BRANCH' -
|
merge2 = !sh -c '_CURRENT_BRANCH=$(git symbolic-ref --short HEAD) && git checkout $1 && git merge $_CURRENT_BRANCH && git checkout $_CURRENT_BRANCH' -
|
||||||
bg = "!f() { git branch | grep $1; }; f"
|
bg = "!f() { git branch | grep $1; }; f"
|
||||||
delbr = "!f(){ git branch -D $(git branch | grep \"\b$1\"); };f"
|
delbr = "!f(){ git branch -D $(git branch | grep \"\b$1\"); };f"
|
||||||
|
|||||||
@@ -4,16 +4,21 @@ return {
|
|||||||
opts = {
|
opts = {
|
||||||
signs = {
|
signs = {
|
||||||
-- TODO add hl to colorscheme
|
-- TODO add hl to colorscheme
|
||||||
add = {hl = 'GitSignsAdd' , text = '▎', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
|
add = { hl = "GitSignsAdd", text = "▎", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
|
||||||
change = {hl = 'GitSignsChange', text = '▎', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
change = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
|
||||||
delete = {hl = 'GitSignsDelete', text = '契', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
delete = { hl = "GitSignsDelete", text = "契", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
|
||||||
topdelete = {hl = 'GitSignsDelete', text = '契', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
topdelete = { hl = "GitSignsDelete", text = "契", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
|
||||||
changedelete = {hl = 'GitSignsChange', text = '▎', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
changedelete = {
|
||||||
|
hl = "GitSignsChange",
|
||||||
|
text = "▎",
|
||||||
|
numhl = "GitSignsChangeNr",
|
||||||
|
linehl = "GitSignsChangeLn",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
numhl = false,
|
numhl = false,
|
||||||
linehl = false,
|
linehl = false,
|
||||||
watch_gitdir = {
|
watch_gitdir = {
|
||||||
interval = 1000
|
interval = 1000,
|
||||||
},
|
},
|
||||||
sign_priority = 6,
|
sign_priority = 6,
|
||||||
update_debounce = 200,
|
update_debounce = 200,
|
||||||
@@ -39,6 +44,7 @@ return {
|
|||||||
map("n", "<leader>ghD", function() gs.diffthis("~") end, "Diff This ~")
|
map("n", "<leader>ghD", function() gs.diffthis("~") end, "Diff This ~")
|
||||||
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "GitSigns Select Hunk")
|
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "GitSigns Select Hunk")
|
||||||
end,
|
end,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user