Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
2 votes
0 answers
20 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 ...
user avatar
0 votes
1 answer
16 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: ...
user avatar
0 votes
0 answers
5 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 ...
user avatar
1 vote
1 answer
55 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-...
user avatar
2 votes
1 answer
57 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 ...
user avatar
1 vote
0 answers
34 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 ...
user avatar
0 votes
1 answer
30 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 ...
user avatar
1 vote
1 answer
45 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, ...
user avatar
2 votes
1 answer
34 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-...
user avatar
0 votes
2 answers
100 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 ...
user avatar
2 votes
2 answers
106 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 ...
user avatar
0 votes
0 answers
29 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 ...
user avatar
  • 315
0 votes
1 answer
45 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.
user avatar
1 vote
1 answer
20 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 ...
user avatar
2 votes
1 answer
43 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 ...
user avatar
1 vote
1 answer
34 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 ...
user avatar
0 votes
0 answers
19 views

Hide projectile-files-errors

My Issue: I'm getting a fatal error due to a missing url for a submodule path in a project I'm working on. Desired Result: Every time I run Projectile to grep my project, I end up getting the annoying ...
user avatar
  • 176
0 votes
0 answers
34 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 ...
user avatar
0 votes
0 answers
49 views

How to make `git fetch` `git rebase origin/master` work in Magit?

I have a branch that I have been working on. At the same time, master branch was evolving. I decided to put my local branch changes on top of master new changes. Thus, after pulling changes on master, ...
user avatar
1 vote
2 answers
59 views

How to git reset --hard HEAD~1 in Magit?

I accidentally inserted 1 commit in my local master branch. I have not pushed this changed and I want to remove it. This was supposed to be in a new branch. So, I created a new branch based on master ...
user avatar
1 vote
1 answer
26 views

Is there a "follow-mode" when moving through a magit-log (or similar buffers)?

I have some recollection that there was something like a "follow-mode" for some magit buffers (e.g., magit-log). The idea was that I could pull up a log (e.g., with C-x g l l), put point on ...
user avatar
1 vote
1 answer
30 views

Using magit-add-section-hook in spacemacs startup

I am attempting to use magit-add-section-hook in dotspacemacs/user-init. (defun dotspacemacs/user-config () ;; Magit pull submodules. Don't know why this fails. (magit-add-section-hook 'magit-...
user avatar
0 votes
0 answers
20 views

MAGIT: is it possible to visualize only deleted portions of commit?

As part of my workflow with Magit, I like checking the red parts (deleted) changes of my commits visually quickly when committing in Emacs, given that in Emacs I must be careful not to chunk huge ...
user avatar
0 votes
0 answers
20 views

Limit magit-log-all

I'm using magit on Emacs 27.1 on a project with a lot of commits (27000). When I first start magit-log-all it shows about 80 commits which is fast, but if I increase the log for any reason then next ...
user avatar
  • 493
1 vote
2 answers
71 views

How to make the writing of my commit messages faster in Magit?

I am using Magit. After staging some changes, when I press to commit something, Magit opens a buffer like this: # Please enter the commit message for your changes. Lines starting # with '#' will be ...
user avatar
1 vote
2 answers
80 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-...
user avatar
  • 11
0 votes
0 answers
118 views

Setup Magit Forge to connect Gitlab

I am using a Gitlab, say gitlab.company.org. My username on that machine is user and I am using 2FA. I have read the Forge User and Developer Manual. It asked to read and follow the instructions of ...
user avatar
  • 343
0 votes
0 answers
39 views

Pushing a gitlab release

Is there a way to push via Magit, so that the push will automatically produce a release in GitLab? For example: I prepare my files, open the Magit status buffer, stage the file via s, commit the file ...
user avatar
  • 343
1 vote
2 answers
37 views

How to control the number of characters for the SHA1 displayed in Magit's log view?

I've noticed some repositories use 7 characters, others 11 when displaying a SHA1. It looks as if magit uses the output of git log --pretty=oneline --abbrev-commit however I can't see how to configure ...
user avatar
  • 7,179
0 votes
0 answers
41 views

Close all open Magit buffers when opening a new project

When using Magit, the multitude of buffers can become a bit confusing when switching buffers. Therefore I prefer to have only one git-repository open in Magit. My current procedure of switching to ...
user avatar
  • 133
0 votes
0 answers
15 views

Jump to last staged hunk

Inspired by this question and workaround: ...stage the whole hunk, and then unstage the line which you don't want... How do you jump to the last staged hunk in Magit?
user avatar
0 votes
0 answers
10 views

Let `magit-insert-local-branches` sort branches according to the branch.sort configuration

Is it possible to configure magit to sort branches inserted with magit-insert-local-branches into the main status page according to some criteria, for example whatever is configured as branch.sort in ...
user avatar
  • 133
0 votes
0 answers
17 views

How can I disable projectile-mode in certain buffers? [duplicate]

I have (projectile-global-mode) enabled and I'd like to disable projectile-mode in certain buffers (e.g. the magit status buffer) so that their keybindings don't interfere. Is there a way to do that ...
user avatar
  • 145
0 votes
0 answers
24 views

How can I disable `diffing` in magit during git commit?

When I commit using magit (git-commit-mode) shows following message Diffing changes to be committed (C-g to abort diffing) in the mini-buffer before typing the commit message. Would it be possible to ...
user avatar
  • 1,036
2 votes
0 answers
54 views

how to teach magit to pass multiple push-options at once

GitLab has a few push options for which I'd like to create switches in magit-push's transient. Causing -n to add -oci.skip is simple enough: (transient-append-suffix 'magit-push "-n" '("...
user avatar
  • 143
0 votes
2 answers
150 views

How to debug error in process sentinel?

I've recently switched to doom emacs, and for the most part it's working great. However, when I'm looking at a folder in dired-mode, if I copy a file using C the file is copied but *Messages* contains ...
user avatar
1 vote
2 answers
196 views

Corrupt Git configuration in magit

I updated My macOS to Monterey. After that, magit command yields "Corrupt Git configuration". I uninstall emacs and magit and install them again, but it does not resolve. How do I fix that?
user avatar
  • 101
2 votes
0 answers
26 views

Does magit-log-mode support selecting commits?

Is there the concept of selection with magit-log mode? Is there some way to tag and operate on multiple commits for example? Note that I'm developing a package that could use the concept of selected ...
user avatar
  • 7,179
0 votes
0 answers
50 views

Magit is slow in a repository with many merge commits

This is one of the many company's repositories, and the apparent difference between this one and many others that work more or less fine is that it has a huge number of merge commits. The way CI is ...
user avatar
  • 10.9k
0 votes
1 answer
68 views

How to filter by author in magit-log?

In gitk you can for example do: gitk --author="Some Name" Is there a way to show/hide commits by author in the log view?
user avatar
  • 7,179
0 votes
0 answers
29 views

Way to filter/search authors in magit-cherry

Most of the times I have to backport my commits to the upstream for that I need to only check the cherries which were authored by me, is there a way I can narrow them by the C-sing the author name? I ...
user avatar
2 votes
2 answers
63 views

Keeping track of "read" commits in magit?

When viewing commits in magit's log view, is there a way to treat commits in magit in a similar way to email? Where I can track their "read" status? (set unread, mark as read... etc). Is ...
user avatar
  • 7,179
1 vote
1 answer
57 views

How to replace the diff output shown by magit?

Is there a way to switch out magit's diff display with a 3rd party output? I would like to use delta which has syntax highlighting & word-level diffs. Is there a way of integrating 3rd party ...
user avatar
  • 7,179
0 votes
1 answer
39 views

How to diagnose invalid slot name in Magit Forge

I thought I had found a minor issue in Magit forge, and before reporting a bug I wished to update to the latest version. In the process I seem to have borked my installation. The value of my package-...
user avatar
2 votes
1 answer
102 views

What's this `slot-missing: Invalid slot name: "#<forge-database forge-database-156f3376b4d8>", :file`

I somehow messed up my magit/forge db, and now emacs won't forgive me. Now I can't open magit's status buffer, and sometimes not even a file buffer opens. This is all I can gather from the Messages ...
user avatar
  • 185
2 votes
1 answer
102 views

company-mode popups and magit current region are dark while current theme is light

I've been successfully using lsp-mode and magit for a while with a light theme (leuven). Today I was messing with something seemingly unrelated (company-mode and auto-complete settings in my ~/.emacs ...
user avatar
2 votes
1 answer
58 views

magit equivalent of gitk's "touching paths"

I'd like to find commits touching specified path in a magit-log buffer. Gitk has this as a filter "touching paths". Is there a way to do this in Magit? I usually run gitk --all or gitk ...
user avatar
0 votes
1 answer
19 views

How to repeat last magit search and modify an option?

Searching through the git log with magit is a breeze. When I do a complex search, I may pass five arguments. If I then realize I want to search again with one option changed, how can I get all search ...
user avatar
1 vote
0 answers
41 views

MAGIT: meaning of magit status: head, rebase, push (git newbie)

In my magit status I see the following: Head: master Commit message Rebase: origin/master Commit message Push: origin/master Commit message I may have done something (pressed some keys) ...
user avatar
1 vote
1 answer
66 views

Add custom entry to magit-dispatch

One of the commands I find myself running very often is git grep. I would really like it to be accessible through the same magit menu as other commands. However, from my understanding of magit.el, it ...
user avatar
  • 10.9k

1
2 3 4 5
14