Questions tagged [magit]
is an Emacs extension for the Git version control system.
704
questions
2
votes
0
answers
27
views
magit search in buffer, only file names, not contents?
If I run M-x magit I see a big list of staged and unstaged file paths. I want to search through the list of file names, using my usual Emacs command of C-s (isearch-forward). But in this magit buffer ...
0
votes
1
answer
50
views
How add Evil keybindings to Magit, without removing all Magit prefix-keys
In magit status of a Git repository, you usually press f u to fetch from upstream (these keybindings in Magit will call magit-fetch-from-upstream).
With Magit keybindings I have noticed the letters ...
0
votes
0
answers
19
views
Unknown fix for error: cl--generic-build-combined-method: Cyclic definition: %S: loadhist-unload-element
I'm using emacs 27.2 and magit version 20231109.935. When I'm inside a directory and try to run magit-status or magit-init I get the error message in the title:
cl--generic-build-combined-method: ...
3
votes
2
answers
430
views
Seq-Keep is void when installing magit through use-package
I've been attempting to use magit but it keeps throwing an error that seq-keep is void. I started up emacs only installing use-package and magit and the issue persists. However, when I installed magit ...
2
votes
0
answers
100
views
Hide "^L" in magit log buffer
How can I configure the display in the magit buffer so that "^L^L^L" is rendered as a white space? On other platforms, I'm used to seeing entries separated by whitespaces
magit 20230924....
0
votes
0
answers
19
views
Magit: How turn SHA1's in commit messages into links?
Is there a way in magit to turn SHA1 hashes in the commit-message body into a clickable link? (currently it's necessary to click on the SHA1 and press Enter).
Related to: How to follow commit hashes ...
2
votes
0
answers
100
views
Magit error: Wrong type argument: listp
I recently updated magit and since then I haven't been able to create commits with it.
When I try to create a commit in the magit-status interface, I get the error:
command-execute: Wrong type ...
1
vote
0
answers
29
views
How can I make magit aware of an upstream branch?
I have a preexisting (github) repository with 2 branches: master and release. I successfully set my own local copy of the master branch to origin/master but when I try to set the release branch (using ...
0
votes
0
answers
24
views
How to programmatically set the same flag for multiple transient-values? [duplicate]
How can I programmatically set the same argument (e.g., --gpg-sign=abc123) for multiple transient-values? If I try the following, it seems that the value of adamliter/my-gpg-key-sign-git-arg does not ...
0
votes
1
answer
60
views
Push to GitHub via Magit retrieves error: "error in process sentinel: Symbol’s function definition is void: compat-assoc" but works. How to fix it?
I am using Magit in my Emacs. This is my config file.
I have been using this package for a long time without issues. Recently, some weird error messages started to appear. After pressing to push a ...
0
votes
1
answer
43
views
Problem with UTF-8 characters in magit buffers
I have my Emacs working in a manjaro (based on arch linux) and the languaage set catalan.
It is working well, but I had a problem with dired buffers showing weird symbols and solved adding this ...
0
votes
0
answers
18
views
Two pushurl failed with `magit-push-current-to-upstream`
I have two pushurls, say owner1 and owner2, set to a remote.
$ git remote -v
origin https://github.com/owner1/repo (fetch)
origin https://github.com/owner1/repo (push)
origin https://github.com/...
1
vote
2
answers
94
views
How to view only the current author in magit log? (as a toggle)
I would like a way to press a key binding that limits the git log to the author of the current commit.
Pressing the same key again should clear the author field.
Note that I'm aware of how to do this ...
0
votes
0
answers
110
views
Using Windows git.exe with Magit on WSL2 Hangs on commit
I currenlty run emacs-nox on WSL2. My workflow is as such:
[Gentoo Linux Host] –ssh–> [WSL2 Ubuntu 22.04.2 LTS (Windows VM)] –open–> [emacs] –edit–> /mnt/c/<Path>/<Files>
There is ...
0
votes
1
answer
51
views
magit log with more complex glob pattern for --remotes argument
I want to add a custom log option via (in init.el after some require magit package introduction):
(defun magit-log-my-stuff (&optional args files)
(interactive (magit-log-arguments))
"...
0
votes
0
answers
37
views
Unable to commit in Magit in a repo on an NTFS filesystem
My situation is similar to this question: I have a git repository on an NTFS volume mounted on Linux (Ubuntu). Using Magit I am able to see status, stage and unstage, but committing doesn't work and ...
0
votes
0
answers
79
views
How do I pop/apply selecting a file or hunks from file in stash using Magit?
I need to select some files or hunks in one file in existing stash entry unsing Magit?
How can that be done,what keys to press after Z (magit pre-command)?
0
votes
1
answer
89
views
Magit Log for Directory (git log -p -- /)
In git, the following shows patchlog for a directory
git log -p -- hukarz/
How can I do this in Magit?;) I found some patch for it, but has this been included in Magit?
Here's the patch I found
...
0
votes
1
answer
34
views
magit-reset-quickly does not work anymore
When in magit-status and having files in the "Unstaged changes" list I always could go to one of these files and press x to run magit-reset-quickly revert the changes on this file.
But now ...
1
vote
0
answers
54
views
Magit doesn't show diff highlighting until hunk is active
I recently started encountering a new issue, and I'm not sure why. When opening a Magit status buffer, the diff highlighting doesn't appear until I select a hunk, in which case it appears for just ...
0
votes
1
answer
64
views
How to get Magit to show popup when launched
I am getting used to learning Magit and I am having to launch the pop-up every time I use Magit so I was wondering if there is a way to have it do that by default instead of after I hit C-c C-c?
I ...
0
votes
1
answer
64
views
Magit commit gives "transient-setup: Wrong type argument: integer-or-marker-p, nil" message
I apologize if this is a noob-question, I have little experience with Git. I wanted to set up Magit for my projects, and I followed the "Getting Started" section of the Magit manual by ...
7
votes
1
answer
2k
views
DOOM Emacs: Error running hook "global-git-commit-mode" because: (void-variable transient-base-map)
Full error (on the bottom line): Error (doom-first-file-hook): Error running hook "global-git-commit-mode" because: (void-variable transient-base-map)
Hello! I'm running this on an M1 chip ...
1
vote
2
answers
111
views
In magit, I want to (easily) see how a piece of code changes over time with commits
I'm curious if there's an easy way in Magit to see how a piece of code changes over time, i.e., with each commit.
I'd like to have one window open in Emacs, focusing on the code/function I want to see ...
0
votes
1
answer
57
views
Magit `zz` (stash both) does not allow whitespace in minibuffer
Sometimes when using command zz (stash both), the minibuffer to enter a stash message does not allow me to enter whitespace (e.g. space chars). I typically resolve to use dashes or underscores or even ...
0
votes
1
answer
265
views
How to checkout a Pull Request locally using Magit interface?
Suppose someone (not me) submitted a Pull Request on GitHub.
Locally, I would like to run that work. Hence, I need to have the code locally. Following this documentation, I can achieve that in the ...
0
votes
1
answer
133
views
Magit aborts commit that runs with husky precommit hook but the commit works on the command line
I'm a bit a bit stumped by an annoying problem that I'm having with magit. I'm working in a monorepo (lerna) repository that uses husky to run a precommit hook. The hook runs on packages that have ...
0
votes
0
answers
23
views
if: Blaming failed due to unexpected output:
Linux Ubuntu 20
Emacs 28.1
I want to create magit-reset-soft
I try but get error:
if: Blaming failed due to unexpected output:
Here steps:
0
votes
0
answers
53
views
Debug Magit ssh authentication failure over TRAMP
I am using TRAMP to interact with files on a remote Raspberry Pi device from my MacBook.
When I SSH into the remote device with the CLI, git is able to find the associated SSH keys and pull/push from ...
0
votes
0
answers
28
views
Getting Magit to Show Word Count Diff
I'm aware that by setting
(setq magit-diff-refine-hunk 'all)
we can get magit to show the words added/changed:
Question: Is there a way to force the display the total number of words added, total ...
1
vote
1
answer
91
views
In Magit, how can I quickly diff changes in the current file since my last own commit?
When collaborating with others, I often need to check what others have changed in a file since I last worked on it. Is there an easy way in magit to do this? I.e. show the diff between my last own ...
0
votes
1
answer
22
views
How to change the commit associated to a tag on a branch that has already been pushed to GitHub?
I have attributed a tag called origin/v0.4.9 for a specific commit on a GitHub Pull Request. I thought the PR was simple, stable, and "a certainty" to be merged really fast. I was wrong.
I ...
1
vote
1
answer
33
views
When a merge-conflict happens and two options are shown, what is the magit command that allows the user to easily pick one of them?
Suppose a merge conflict happens. There are two options shown the upper (in red) and the lower (in green):
I would like to avoid complex ediff-mode stuff to pick one. I have seen some tutorial where ...
1
vote
0
answers
63
views
How to hide tag in `magit-log`
Please see the screenshot of my magit-log-branches:
I encounter some projects has lots of tags on each commits, and this situation cause each lines in magit-log tooooooooooooooo long and the magit-...
0
votes
1
answer
161
views
Why can't I solve this merge conflict on Magit?
I am working on a feature via Pull Request. While I was working, main branch evolved.
Now, I want to put my changes on the Pull Request on top of latest main branch. This means I want to rebase.
Hence,...
0
votes
1
answer
39
views
Toggle visibility of unchanged files in magit-status
I want to rename a number of tracked but unchanged files via magit. I know that I can use R (magit-file-rename). However, magit-status does not show me unchanged files.
How can I toggle the visibility ...
2
votes
2
answers
66
views
When I do `magit-process-buffer` (`$`) it shows an ellipsis (`…`). What is behind the `ellipsis`?
I wanted to investigate the difference between magit-branch-and-checkout (b c) and magit-branch-spinoff (b s), so I invoked the Magit output buffer with $. I see the following output:
0 git … ...
1
vote
1
answer
38
views
Can I tell magit to show untracked files with a repo .git/config that tells it not to?
In my repo's .git/config I have status.showUntrackedFiles set to no (for performance, because it's a very large repo).
However, sometimes (e.g. before I push to remote) I'd like to manually check, ...
0
votes
0
answers
169
views
Magit cannot commit. emacsclient on PATH. Pop! OS
magit-status sees the repo just fine, and I can even push to Github, or make a branch. I can also commit through the git cli no problem.
However, before I can even write my commit message on magit I ...
1
vote
0
answers
29
views
Insert a magit-section without refreshing the buffer
I'm experimenting with magit-section as the UI library for an Emacs package. Without going into too much detail, this package interfaces with a websocket and displays the data it receives as an ...
0
votes
1
answer
28
views
In Magit, is it possible to know when an unstaged change happened? How to find that information?
I have a repository under version control and I am using Magit as an interface to git.
I can see one unstaged change in a file after executing magit-status (C-x g). This means the file was changed and ...
1
vote
0
answers
29
views
Can the Magit Forge issue list filter by assignee? Or display assignees?
I'd like to get Magit Forge to show me just the issues that are assigned to me. Or else display the assignees. How can this be done?
0
votes
1
answer
44
views
Why while being in a local branch can't I pull into a local branch from another local branch with no potential for merge conflict? "No match"
See the picture below:
I am in a branch called 430-toggle-hide-show-colums (in green).
This is a local branch pushed to GitHub as P.R. draft (not yet merged).
Accidentally, I ended up doing ...
2
votes
0
answers
24
views
pressing enter in the magit "git log", can the commit be shown in the full height of the screen instead of a half screen?
When I press RET in the magit "git log", can the commit be shown in the full height of the screen instead of a half screen?
RET runs the command magit-show-commit (found in
magit-commit-...
0
votes
1
answer
44
views
How can I activate truncate-lines in magit only
I want to long commit messages to be truncated rather than wrapped around in magit buffers only because I can simply open a commit to see the full message.
I tried
(add-hook 'magit-mode-hook (lambda ()...
2
votes
0
answers
419
views
Magit is unbearably slow on WSL2
I'm running magit in a medium-small project, on WSL2 through xming on windows 10.
The startup time for magit is in the high tens of seconds, and so is every other action.
This is not the case in the ...
0
votes
0
answers
249
views
Run pre-commit hooks when using magit, poetry, and tramp
This is an emacs & magit version of the following question, with an added twist.
https://stackoverflow.com/questions/72839263/access-python-interpreter-in-vscode-version-controll-when-using-pre-...
1
vote
1
answer
104
views
Git in Emacs: Possible to Display Current User Identity for Repo?
Background
I use multiple Github accounts on one computer.
To make sure that the name and email addresses (which I will call User Identity from here) associated with a commit match up to the name on ...
0
votes
1
answer
36
views
How can I use 'transients' in 'magit' to enable case-insensitive search? [closed]
I got it working a year ago, then my machine died. I've been unable to figure out the interface to transient.
When I view the levels (green and red, with numbers in them), I hit '-i' but see an error '...
2
votes
1
answer
300
views
How to do a "git fetch --all --tags" in Magit?
I would like to pull changes from an upstream repository. More specifically, I would like to pull all the tags that were introduced. On the terminal, I can do:
$ git fetch --all --tags
On Magit, ...