Commit Graph

38 Commits

Author SHA1 Message Date
Sanchayan Maity 7f086ca74a
git: Arrange alphabetically for sanity 2023-01-14 18:58:51 +05:30
Sanchayan Maity 22596f2998
git: Set context and interHunkContext to a higher value
Default value of 3 turns out to be low sometimes. Increase it to 8.
2023-01-12 18:39:37 +05:30
Sanchayan Maity 8a38372b6c
git: Add signing key 2022-12-16 20:05:56 +05:30
Sanchayan Maity ac6a09238e git: Enable updateRefs by default for rebase
The feature is explained here
https://github.blog/2022-10-03-highlights-from-git-2-38/#rebase-dependent-branches-with-update-refs
2022-11-04 17:46:44 +05:30
Sanchayan Maity ca2d092166 Revert "fish/git: Manually set file type to git when calling nvim"
This reverts commit 2102b9983b.

Guess this got fixed in upstream commit 927d4d2.
2022-09-05 16:20:01 +05:30
Sanchayan Maity 2102b9983b fish/git: Manually set file type to git when calling nvim
This reverts 7b84c0e again. Seems the issue is back with upstream.
2022-08-06 11:18:12 +05:30
Sanchayan Maity 96aa7aec83 git: Use nvimdiff1 as the merge tool
The feature provided by the vim-diffconflicts plugin seems to have been
merged upstream. Use of nvimdiff1 should now suffice.

See https://www.eseth.org/2020/mergetools.html

There also seems to be a new proposal adding layout support which will
be interesting once merged.
https://lore.kernel.org/all/20220327112307.151044-1-greenfoo@u92.eu/
2022-05-04 10:59:39 +05:30
Sanchayan Maity c878a7b0be git: Use zealous diff3 style of merge conflict presentation
This is only available from git 2.35. A description of how this works is
in the original commit.
4496526f80
2022-05-03 18:31:36 +05:30
Sanchayan Maity 6a6a8b4d2a git: Global blame settings 2022-04-12 18:26:44 +05:30
Sanchayan Maity fc7d824d99 git: Do not use nvim as pager
For big repositories, using neovim as pager slows down commands like
git log.
2022-04-12 12:31:45 +05:30
Sanchayan Maity 2ca0beb1bf git: Add difftastic as a difftool option 2022-03-31 19:37:31 +05:30
Sanchayan Maity 7b84c0eb20 Revert "fish/functions/gl: git: Manually set the file type to git when calling nvim"
This reverts commit a30eda8531.

Fixed upstream with https://github.com/neovim/neovim/pull/17517.
2022-02-26 11:04:30 +05:30
Sanchayan Maity a30eda8531 fish/functions/gl: git: Manually set the file type to git when calling nvim
See discussion in
https://github.com/neovim/neovim/issues/16940
2022-01-06 15:15:20 +05:30
Sanchayan Maity f3fdde252a git: Add support for using kitty as a difftool
While at it drop unnecessary double quotes.
2022-01-04 19:35:33 +05:30
Sanchayan Maity 168e03563d git: Use neovim as our diff tool and pager 2021-12-14 15:44:33 +05:30
Sanchayan Maity 19e5b410b9 git: Continue listing the history of a file beyond renames 2021-10-20 18:01:08 +05:30
Sanchayan Maity 138720944c git: Drop followTags setting for push
Not sure if we ever really needed this considering that we work on open
source projects, where we need only push the branch from which we raise
the MR. Pretty much the same for current client work as well. Are tags
ever required for such scenario?.
2021-10-14 15:01:43 +05:30
Sanchayan Maity ccdb81f9b5 git: Set push.default
Do not push anything (error out) unless a refspec is given. We want
to avoid mistakes by always being explicit.

See https://git-scm.com/docs/git-config#Documentation/git-config.txt-pushdefault
2021-09-25 13:21:01 +05:30
Sanchayan Maity 0a220f0e8d git: Fix merge tool command 2021-04-28 13:29:17 +05:30
Sanchayan Maity b70f282dc8 git: Update to use our own email id 2021-02-12 00:58:47 +05:30
Sanchayan Maity 9377d973c1 git: Set default branch 2021-02-02 09:40:08 +05:30
Sanchayan Maity 6828369a17 git: Set auto squash for rebase by default and addEmptyPathspec to false 2021-01-30 15:03:57 +05:30
Sanchayan Maity dfe44fb14c git/nvim: Switch to using diffconflicts for resolving merge conflicts
While we dropped diffconflicts earlier and switch to vanilla vimdiff,
two way merges are definitely better than three way merges. 3 way merge
as in gina or vimdiff is extremely confusing except for may be the
simplest of merge conflicts.

conflict-marker and diffconflicts should let us handle all cases.
2020-12-19 16:29:06 +05:30
Sanchayan Maity 3e3b3cd153 Revert "git: Use vimdiff3 for merge"
This reverts commit 513c5f4dda.
2020-10-06 17:28:16 +05:30
Sanchayan Maity a37f176d94 git: Prune tags by default on fetch 2020-10-05 17:59:25 +05:30
Sanchayan Maity 39e9b824a6 git: Some improvements to git configuration
Use fast forward only for merge, auto stash when doing rebase and take
care of tags when doing a push.
2020-10-02 12:08:21 +05:30
Sanchayan Maity 4f6aedb2cd git: Some updates based on delta's README 2020-09-26 10:48:00 +05:30
Sanchayan Maity 513c5f4dda git: Use vimdiff3 for merge
Use vimdiff3 instead of vimdiff. Might be better as mentioned below?
7c147b77d3
2020-09-26 10:48:00 +05:30
Sanchayan Maity 61d5759407 git: Set fetch.prune globally
Automatically delete remote tracking local branches that have been
removed from remote. This makes pruning references part of our
normal work flow.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-09-18 11:32:05 +05:30
Sanchayan Maity d8fc9facec nvim/git: Use vimdiff as merge tool & drop DiffConflicts
The conflict markers plugin is what we have been using all the time and
is useful even without resorting to merge tool. Drop the DiffConflicts
plugin and use vimdiff as the merge tool if at all we need to resort to
a full 3 way merge view.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-09-17 10:48:11 +05:30
Sanchayan Maity 6bca8ccaad git: gitconfig: Use merge as default strategy for git pull
git config pull.rebase false  # merge (the default strategy)
git config pull.rebase true   # rebase
git config pull.ff only       # fast-forward only

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-06-13 14:15:10 +05:30
Sanchayan Maity fd5c5b15f5 git: gitconfig: Always use verbose for commits
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-05-21 10:27:17 +05:30
Sanchayan Maity f8ce9ccb21 git: gitconfig: Remove diff3 as conflict style
diff3 as conflict style was required by vim-mergetool. It is not
required by the current plugins we are using.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-05-05 11:26:23 +05:30
Sanchayan Maity 534eebb89e nvim: Remove mergetool and switch to DiffConflicts for git merge
Also add the conflict-marker plugin. This should also be useful
for doing rebases and resolving conflicts. Might drop one later
if one of them serves all the purposes in all cases.

While at it, add unimpaired style bindings for moving between
tabs. This is required since :DiffConflictsShowHistory opens
a new tab and default tab navigation bindings gt/gT at least
are binded to something else in python.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-05-03 21:35:28 +05:30
Sanchayan Maity 7eeb5cf7ea git: Use a global gitignore
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-04-16 10:26:58 +05:30
Sanchayan Maity 7738d0c621 git: Use vim-mergetool for merge conflicts
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-02-16 17:54:11 +05:30
Sanchayan Maity 2237cdf38f git: Update gitconfig
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2019-12-31 14:59:43 +05:30
Sanchayan Maity 8f0b2fb93e Individual configs should still be in directories
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2019-12-31 14:38:50 +05:30
Renamed from gitconfig (Browse further)