Questions tagged [magit]
is an Emacs extension for the Git version control system.
704
questions
21
votes
2
answers
2k
views
How to pronounce "magit"?
Q: How does one pronounce magit?
It occurred to me today that I've never said "magit" out loud, and I'd prefer not to make a fool of myself if I ever have to do so.
So: is the g in magit pronounced ...
0
votes
1
answer
104
views
Ignoring specific remotes when running `magit-log-popup` to log all branches
I would like to add an option in magit-log-popup to ignore a list of remotes when using "Log all branches" (l b). What I'm trying to do is something like this git log HEAD --branches --remotes --not -...
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 ...
4
votes
1
answer
105
views
How do I jump to the previous/next modification (relative to the git HEAD) in the current file?
How do I jump to the previous/next modification (relative to the git HEAD) in the current file?
Ideally, I like sth like swiper that lets me choose to easily jump between modifications.
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 ...
3
votes
2
answers
431
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
2
answers
356
views
How can I configure magit to use `diff-so-fancy`, not `magit-delta`?
How can I use diff-so-fancy in magit rather than magit-delta?
I'd like to refine diff buffer in Emacs with magit.
I found diff-so-fancy and prefer it to delta for several reasons.
I installed diff-so-...
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: ...
1
vote
2
answers
172
views
Undo stage hunk in magit
If I accidentally staged a hunk that I wanted a better look at, how do I undo that action (the most recent action). C-/ does not work.
Sure I can U to unstage all, but say all else staged is valid.
10
votes
1
answer
1k
views
Meaning of magit status buffer: Head, Merge, Push
Can someone explain what the top three lines of the magit status buffer mean? Especially Merge: origin/master Commit message
Head: master Commit message
Merge: origin/master Commit message
...
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 ...
6
votes
1
answer
624
views
How to change the default transient level temporarily? ("Show hidden magit commands")
Many commands that are rarely used in magit are hidden by default. Magit uses the transient.el library for popups and the visibility of infix and suffix commands are controlled by transient-default-...
5
votes
2
answers
2k
views
magit with tramp is slow
Here is my environment:
project A is on the server. My PC connects to the server by 1 Gbit ethernet. Ping latency between PC and server are about 0.3 ms.
project A's source code size is about 75 MB. ...
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))
"...
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 ...
1
vote
1
answer
148
views
Cannot invoke transient magit-pull while minibuffer is active
I'm using magit. When I try to pull or commit, I get this message in the mini-buffer:
Cannot invoke transient magit-pull while minibuffer is active
I can assure you, I have closed every magit-related ...
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/...
0
votes
1
answer
70
views
How to disable magit-revision buffer from following the cursor in blame buffers?
Open a file in a git repo that is modified by two commits. Run magit-blame.
*author1 date1 commit1*
line1
*author2 date2 commit2*
line 2
Focus on the first line, press Enter. A magit-revision ...
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 ...
10
votes
7
answers
2k
views
How to Implement Popup Menu Similar to That Used in Magit
Question
I would like to create user interface in form of popup menu, popup menu
similar to that used in Magit.
Features
Definition of Popup
Popup in context of this question means little ...
10
votes
3
answers
676
views
Magit: Getting to the current/editable version of a file from a commit/diff view
Very similar to this question, particularly the second part to this answer:
From the diff view of a specific commit, is there a way to jump to the current+editable version of a modified file? If I ...
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 ...
1
vote
2
answers
121
views
Magit WIP mode: how to suppress prompt about saving ~/.abbrevs?
I recently started using magit-wip-mode, but it's got a feature that I'm finding very disruptive to my workflow: if I have defined an abbrev, which I do frequently, then saving any file with C-x C-s (...
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
...
8
votes
4
answers
2k
views
use nonstandard `.git` directory with magit
I have been using the setup described on the top comment here to manage my dotfiles using git. In short, I have this in my .bashrc:
alias config='/usr/bin/env git --git-dir=$HOME/.myconf/ --work-...
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 ...
7
votes
2
answers
938
views
Magit remove local branches that were merged into another branch
Explaining the problem more in-depth than the titular definition:
Often I merge branches into master and want to prune based on that. M-p works fantastic for removing the remote branches (eg origin/...
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)?
2
votes
2
answers
280
views
Magit: enable `toggle-truncate-line` in diff-mode
I'm working with tex files that have usually long lines of text. I enabled in magit the fine coloration of errors by using:
(setq-default magit-diff-refine-hunk 'all)
and now I'd like to disable the ...
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 ...
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 '...
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
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 ...
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,...
5
votes
2
answers
205
views
How can I prevent Magit-status command from grabbing the frame focus?
when executing magit-status and quickly focus out emacs, after the magit buffer pops up, emacs grabs the focus back. This is quite inconvenient. Is there a way to prevent that focus changing?
The ...
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 ...
57
votes
5
answers
16k
views
Change a branch's upstream with Magit
When you push a branch with Magit (with P P) and the branch has no
upstream, Magit asks you the name of the branch you want to push to.
That's great.
Once you set the upstream for a branch, however, ...
3
votes
1
answer
136
views
How to see only the local branches created by me on Magit?
When I am working on the Command Line Interface, I can do:
$ git branch
Then, I can see all the local branches that I have created. On Magit, If I do b l (check out local branch), there is a prompt ...
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: