Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
1 vote
2 answers
28 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 ...
  • 113
0 votes
1 answer
31 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 ...
  • 208
0 votes
1 answer
27 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
31 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 ...
  • 326
0 votes
0 answers
8 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:
  • 3,669
0 votes
0 answers
14 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
19 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 ...
  • 849
0 votes
0 answers
36 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 ...
  • 123
1 vote
1 answer
45 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 ...
  • 2,510
0 votes
1 answer
18 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
16 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
24 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-...
  • 980
0 votes
1 answer
39 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
22 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 ...
  • 303
0 votes
0 answers
13 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 ...
  • 123
2 votes
2 answers
39 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, ...
  • 113
0 votes
0 answers
58 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
12 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 ...
  • 13
0 votes
1 answer
26 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
18 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
21 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
18 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
26 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 ()...
  • 230
0 votes
0 answers
172 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
106 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
44 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
19 views

How can I use 'transients' in 'magit' to enable case-insensitive search?

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
80 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
339 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 ...
  • 3,669
0 votes
0 answers
28 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 ...
  • 191
0 votes
1 answer
39 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-...
  • 231
0 votes
0 answers
26 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 ...
  • 131
2 votes
1 answer
68 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
28 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
26 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
148 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
442 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
72 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
130 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
69 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
57 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
169 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
311 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
46 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 ...
  • 337
0 votes
1 answer
84 views

MAGIT: easier to read diffs

Is there a way in MAGIT to see diffs as one line instead of two with deletions and additions in one line? It would be much easier to navigate.
1 vote
1 answer
29 views

How do I make Magit use the active window for operations and, on-exit, return the window to the previous buffer?

I am a recent newcomer to emacs, and I have my screen split into 4 windows in a grid arrangement. I'm having some problems using Magit, which is that it spawns (seemingly arbitrarily) in one of the 4 ...
3 votes
1 answer
119 views

Is it possible to do a git clone using Magit in a directory which is not under version control?

Suppose I am in a folder called local-projects. Using the terminal, I can do: [pedro@system:~/quicklisp/local-projects]$ pwd /home/pedro/quicklisp/local-projects An important information to ...
1 vote
1 answer
77 views

How to customize the magit-todo display

I use Emacs to write documentation, and a lot of times my files end up with some internal markup that looks like this: [TK: Where is the event handler defined?] in-line with the text. (“TK” is writer ...

1
2 3 4 5
14