vim.keymap.set("n", "gs", vim.cmd.Git, { desc = "Git status" }) local Crony_Fugitive = vim.api.nvim_create_augroup("Crony_Fugitive", {}) local autocmd = vim.api.nvim_create_autocmd autocmd("BufWinEnter", { group = Crony_Fugitive, pattern = "*", callback = function() if vim.bo.ft ~= "fugitive" then return end local bufnr = vim.api.nvim_get_current_buf() local opts = { buffer = bufnr, remap = false } vim.keymap.set("n", "p", function() vim.cmd.Git("push") end, opts) -- rebase always vim.keymap.set("n", "P", function() vim.cmd.Git({ "pull", "--rebase" }) end, opts) vim.keymap.set("n", "t", ":Git push -u origin ", opts) end, })