Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 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 ...
0 votes
0 answers
10 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
11 views

Why while being in a local branch I can't 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
15 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
21 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
20 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 ()...
  • 180
0 votes
0 answers
36 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
40 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
34 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
11 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 '...
1 vote
1 answer
40 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
55 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,505
0 votes
0 answers
22 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
38 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
13 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 ...
  • 121
2 votes
1 answer
46 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
21 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
0 answers
13 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
81 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
170 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
47 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
62 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
54 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
44 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
129 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 ...
3 votes
2 answers
186 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
36 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 ...
  • 327
0 votes
1 answer
54 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
23 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 ...
2 votes
1 answer
61 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
50 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 ...
0 votes
0 answers
22 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 ...
  • 176
0 votes
0 answers
45 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
0 answers
53 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, ...
1 vote
2 answers
91 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 ...
2 votes
1 answer
32 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 ...
1 vote
1 answer
46 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-...
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 ...
0 votes
0 answers
23 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 ...
  • 493
1 vote
2 answers
79 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 ...
1 vote
2 answers
121 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-...
  • 11
2 votes
0 answers
180 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 ...
  • 363
0 votes
0 answers
50 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 ...
  • 363
1 vote
2 answers
42 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 ...
  • 7,441
0 votes
0 answers
63 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 ...
  • 168
0 votes
0 answers
17 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?
0 votes
1 answer
17 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 ...
  • 168
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 ...
  • 145
2 votes
0 answers
58 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" '("...
  • 143
0 votes
2 answers
255 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 ...

1
2 3 4 5
14