Questions tagged [magit]
is an Emacs extension for the Git version control system.
691
questions
0
votes
0
answers
38
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
36
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
29
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
1k
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
47
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
42
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
63
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
49
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
9
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
16
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
22
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 ...
0
votes
0
answers
50
views
MAGIT: How to show 2 side-by-side window of only changes, not whole document
Once in the Magit buffer, hit E, choose the diff and when they're displayed then switch to vertical mode with |.
So far so good.
However, this shows three panes, not two.
How to show just current and ...
1
vote
1
answer
51
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
19
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 ...
0
votes
1
answer
21
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 ...
0
votes
0
answers
26
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
55
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
25
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 ...
0
votes
0
answers
16
views
MAGIT: log: finding expressions in committed files and showing lines containing it, not just commit list
I tried to find how to do this unsuccessfully:
When using the search option in MAGIT (l l -G) to search changes, the result is a list of commits that contain such expression. Is there a way to show ...
2
votes
2
answers
43
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
34
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
80
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
14
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
20
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
25
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
0
answers
20
views
Switching to magit-status buffer doesn't update default-directory
I have two opened magit-status buffers for two different repositories. Switching to one of them, and for example listing history (l l) all works. However, switching to the second magit-status buffer ...
2
votes
0
answers
22
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
28
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 ()...
0
votes
0
answers
225
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
130
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
52
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
26
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
115
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, ...
0
votes
0
answers
480
views
cannot 'squash' without a previous commit
Emacs 27.1
Magit
I want to squash some my commits.
Here steps:
1. magit-status (C-M-s)
2. l (little L)
3. l (log current)
4. In the commit history, put the cursor on the oldest of ...
0
votes
0
answers
33
views
Magit: Show diff full screen when selecting a commit in log
In Magit, when I hit SPC or RET, the diff is shown in the bottom half screen. My screen is too small and this half window does not contain enough context. I would prefer to hit RET, have the diff in ...
0
votes
1
answer
41
views
How to display commit signature information in Magit Rev mode when visiting a commit?
Magit displays signature information in the magit-revision buffer when visiting a tag, but I can't seem to configure this behaviour when visiting a commit using the default bindings for magit-visit-...
0
votes
0
answers
36
views
Using emacs magit with gitmoji commit hook
Is there a way to use emacs magit with gitmoji-cli commit hook?
Such hook can be installed via gitmoji -i
Currently, magit shows nothing and waits forever, probably because the hidden gitmoji-cli is ...
2
votes
1
answer
83
views
How to force a git checkout revision in Magit if there are unstaged changes?
On the terminal, in a repository with unstaged changes, I can do:
~/projects/introduction-to-clojure$ git checkout -f 3.7
Branch '3.7' set up to track remote branch '3.7' from 'origin'.
Switched to a ...
0
votes
1
answer
32
views
Which option should I choose when executing "i' (Ignore) on Magit? Should Gitignore be shared in private, at the top level or in subdirectory?
I keep my emacs init file under version control. See the GitHub.
I have the things installed from ELPA also unver version control. Which is annoying. After executing Magit status, I have:
Head: ...
0
votes
1
answer
36
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 ...
1
vote
1
answer
181
views
Make Magit ignore certain files already added to git and to .gitignore
This question is related to this previous question.
These two files below are under version control which causes some inconvenience in magit-status:
Unstaged changes (2)
modified .emacs.d/projectile-...
2
votes
1
answer
537
views
How to properly use Magit Fixup?
I am trying to use the Fixup feature on Magit. I will list a recipe to what it is happening:
(i) - I have a project under version control.
(ii) - My first commit is:
1f61d09 * first commit: add file
...
1
vote
0
answers
93
views
Magit ediff range in a pretty way?
I need to investigate a project, with a patch made by a former student of my university. He made a series of commits on a repo, and I need to see what additions he made.
I got the list of files ...
0
votes
1
answer
169
views
In Magit, what is the difference between stashing "index", "worktree", or "both"?
Honestly, I have always picked both and it has worked out so far. But I do not know in which concrete cases it would be better to pick one over the other. It would be good to see examples.
I tried ...
1
vote
1
answer
81
views
How is the history.el file written? Why did this change happen?
I have been tweaking my config file (init.el). This file is inside a .emacs.d directory which is under version control by Git. I also use Magit a lot.
After editing my config, I was going to stage, ...
2
votes
1
answer
64
views
How to insert a flyspell hook on Magit via `use-package` declaration?
I am rewriting my Emacs config file to fully use use-package and organize code. Currently, I have
(use-package magit
:custom
(magit-display-buffer-function #'magit-display-buffer-same-window-...
0
votes
2
answers
194
views
Can't commit in Emacs 29.0.50 , magit 20220412
I'm running emacs version 29.0.50, with the most recent magit and since yesterday I've not been able to create (or amend) a single commit.
*ERROR*: Not inside Git repository
error: There was a problem ...
4
votes
2
answers
333
views
magit giterror There was a problem with the editor
When I try to commit C-c C-c with magit, I get this error:
There was a problem with the editor '/snap/emacs/1459/usr/bin/emacsclient --socket-name=/run/user/5019/emacs/server'. ... [Hit $ to see ...
0
votes
0
answers
49
views
Magit No Longer Recognizes My Global Config
Overview
This is a new issue for me that started about a week ago.
I started having issues with some git commands in when using magit and vterm recently. Specifically, git couldn't read my global ...