Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

Magit forge: updating the branch of a pull request

Does forge support updating the branch of a PR? Suppose that I checked out a PR branch with b y, and afterwards there were additional commits into this PR. It seems that I cannot pull these new ...
2
votes
1answer
40 views

Is there a way to mark certain file types as binary for magit, so that they are not diffed?

Magit sometimes becomes very slow, when it thinks that certain large files should be diffed. Examples for this are SVG graphics or SQL dumps (technically seen as text files). The files are small ...
0
votes
1answer
23 views

Error in newly installed magit -head branch header wrong type argument

I just installed the magit package in emacs 26.3 (using CentOS 7 OS). When I start it with M-x magit, I get the error below. It works fine for me in an older installation, and the only difference I ...
0
votes
1answer
27 views

Magit + Forge: unable to create a token

I am trying to set up Forge on Doom Emacs to work with Magit on a GitHub repository (I am running Linux Manjaro). Running M-x forge-pull for the first time and following the procedure to create a new ...
0
votes
1answer
24 views

In magit, the log '-s' option shows ESCAPE characters instead of changing the color of the selected text

Here is an example of a copy of the output of the magit log output with -s with the actual names omitted. (The ESC character precedes each of the [31 and [32 sequences in the following example in the ...
0
votes
1answer
41 views

Is it possible to force `markdown-mode` during git commit?

I was using following answer: https://emacs.stackexchange.com/a/57535/18414 to set markdown on the .git/COMMIT_EDITMSG file. (add-to-list 'auto-mode-alist '("/\\.git/COMMIT_EDITMSG\\'...
3
votes
1answer
112 views

Cannot get Magit to show the commit signatures in the log

In order to prove that I had a signature on a commit I needed to use a this command line command: $ git log --show-signature -1 I could not get Magit to display the signature I tried to use the ...
0
votes
1answer
19 views

Deleted package doesn't reappear in the package list

I just deleted magit, but it doesn't reappear in the list as available. I typed g and r, restarted emacs, to no effect. It's not hidden. I use C-s to search for it in the buffer. Supposedly its ...
0
votes
1answer
21 views

Magit error on magit-remote-add

On windows 7 version of spacemacs, with git layer, magit fails when trying to add a remote repository. After I enter the remote name, I get the following error: Debugger entered--Lisp error: (wrong-...
0
votes
1answer
32 views

How to stage selected lines / hunks in diff-mode?

Is it possible to stage changes in diff-mode? Or is this only possible with magit+ediff?
3
votes
2answers
566 views

How can I open magit-status in a new frame if such a frame does not already exist?

How can I open magit-status in a new frame? I've tried to write a custom function for this but it has some issues as described below. (spacemacs/set-leader-keys "gs" (lambda () (interactive) ...
6
votes
1answer
222 views

Use `git add -N` in magit

Wondering if it's possible to indicate intent to add a file via magit. The intention would be to stage parts of an untracked file for a commit but leave the rest, rather than the default git add ...
1
vote
1answer
17 views

See untracked file content

I would like to see the content of the untracked files, so I could see what's there and possibly stage only some lines. I have status.showUntrackedFiles = all, so in magit I can see the files inside a ...
1
vote
1answer
34 views

Can magit stage a hunk / selected lines in 'diff-mode'?

Is it possible to stage the current hunk or selected lines of the hunk in diff-mode? For example, when in diff-mode, what command can I run to stage the current hunk?
0
votes
2answers
69 views

How to disable `git-rebase-mode` after magit is installed?

I'd rather use regular text editing functions when rebasing instead of learning magit's bindings. Is there a way to use magit but disable git-rebase-mode?
2
votes
1answer
47 views

C-x g doesn't always open magit

When I start emacs and press C-x g, it says: "C-x g is undefined". I can open a file belonging to the repository, and it still doesn't work. I need to start it manually (?) (C-x magit-status)...
1
vote
1answer
20 views

magit-diff jumps to insertion/deletion in already opened window (no overlay)

I have 2 windows open: One is the magit-diff of the current repo, the other is just source codes from that repo. In source codes (the right window), I have a file opened, say "sample.txt". In magit-...
1
vote
1answer
25 views

While merging, how to tell Magit to use one version of the file?

When I merge something and there are conflicts, I can go to the file in the magit status page (SPC-g-s) and press, for example, e to start ediff. Within that, I can scroll through all conflicts and ...
4
votes
3answers
568 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
1answer
26 views

Magit forge: is it possible to have “upstream/master” as default when dwim diffing on a pull request?

When my cursor is at a pull request in status buffer, and I press "d d", then I get the diff of master...refs/pullreqs/XXX. This works as intended, if my master branch is up-to-date. However, ...
4
votes
1answer
322 views

Why does the behavior of magit's pull operations differ?

The story here is that I use magit at work, where our workflow involves the use of a preposterous number of branches on our central remote (used for various purposes, but most notably as part of our ...
0
votes
2answers
154 views

Magit error during commit on Windows

I have been getting an error when trying to commit using magit. I stage my change with a, then on commit cc I get the message: Opening output file: No such file or directory, c:/Users/myuname/.emacs....
1
vote
1answer
50 views

How can I add my own key-bindings to magit transient state?

Magit defines a transient state (transient-define-prefix magit-dispatch () "Invoke a Magit command from a list of available commands." ["Transient and dwim commands" [("A" "Apply" ...
1
vote
1answer
32 views

Magit configuration file location on Mac

I want to reset Magit defults for particular pop up that was previously saved using magit-popup-save-default-arguments (https://magit.vc/manual/magit-popup.html). Where is the file created by magit-...
1
vote
1answer
28 views

`magit-tag-release` error: “Invalid version syntax: '0.7-5'”

I'm unable to tag releases with current Magit from Elpa. Doing: t RET r (magit-tag-release) I immediately get the error message: "Invalid version syntax: '0.7-5'" in the minibuffer. This happens ...
1
vote
4answers
937 views

How to kill magit-diff's buffers on quit?

After making a commit in magit, magit will leave around a magit-diff buffer containing just: Staged changes (empty) [back] This is pretty useless and clutters up my buffers, and I'd just like that ...
0
votes
1answer
24 views

Get magit views in to bookmarks plus

After doing some changes in a git "feature branch", I use "magit diff" to review/cleanup before pushing code to GitHub. My question is a) How can I get this ^ magit buffer in to my bookmarks+ (C-x r ...
1
vote
1answer
28 views

How to get diffstat in magit revision buffer?

In MacOS Mojave, I am using magit version 20190319.1911, emacs v26.1, git v2.20.1 (Apple Git-117). How do I get a diffstat in a magit revision buffer? I remember seeing such a diffstat in this buffer,...
10
votes
2answers
2k views

Magit doesn't recognise git repo through ssh connection

I'm using ssh to connect to a remote server. On the server there is a git repo called MRFLSSVM. However, when I execute magit-status on: /ssh:qmServer:/home/Chang/qmCodeLab/MRFLSSVM/ Magit asks me ...
1
vote
1answer
28 views

cannot get magit to visit actual file from diff buffer (have to use a “ffap” based workaround)

When in a magit diff view, pressing enter in a blob 'visit' the file. But this file is a special read only version. The magit manual mentions a way to visit the (actual writable) file: C-<return&...
1
vote
1answer
77 views

Extra carriage-return on magit path

I'm having a little trouble with magit and the default-directory variable. When calling M-x magit-status, an exception is thrown - Setting current directory: No such file or directory, /path/to/git/...
2
votes
1answer
164 views

How to set up Magit Forge with Gitlab?

Reading through Magits documentation there seems to be full support for github through Ghub. I am having trouble replicating the set up for gitlab, it is a supported forge but does not have Ghub ...
0
votes
2answers
51 views

How do I modify magits behavior to use the date that I finalize the commit and not the date that I start the commit

Desired Solution: I want magit to make a commit with a datetime set to the time that I "create" the commit, not the time that I start the commit "creation" flow. Background: So committing in magit ...
16
votes
3answers
5k views

Magit extremely slow in Windows. How do I optimize?

I am forced to use Windows 10 for a project. Yes, I would rather use GNU/Linux. To keep my sanity, I've tried to regard Windows as a bootloader for Emacs :) Unfortunately, Magit (one of my favorite ...
1
vote
1answer
46 views

Disabling Magit's untracked files status

I'm trying out Magit for a monstrously large monorepo at work (think millions of lines of code) and there are many untracked build artifacts. From my shell I always use git status -uno to avoid having ...
43
votes
3answers
9k views

How to easily cherry pick with magit?

I've been using magit for a few months now and I like it a lot. But one thing I still do it in a terminal is cherry picking. What is a simple way to do this?
1
vote
1answer
38 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
0answers
39 views

Unable to create a new commit using Magit on Windows

trying to commit using "M-x magit-status" followed by "c c", keep getting the following: 1 git.exe … "commit" "--" Aborting commit due to empty commit message. sh -c 'printf WITH-EDITOR:: $$: No such ...
7
votes
2answers
1k views

Magit + gerrit - push to other branch

I am using gerrit. When I want to push my commits, I use following command: git push origin HEAD:refs/for/master How can I recreate the same command using Magit?
13
votes
1answer
4k views

Magit diff side by side

I would like to know if there is a way to get the standard side by side diff view in magit. That is, instead of seeing the old code chunk and the new one one after the other, I'd like to see them on ...
0
votes
1answer
68 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 -...
0
votes
1answer
45 views

How to force Magit to use current Emacs instance to edit commit message?

I use emacs -nw + tmux. Just upgraded Magit from 2.8.0 to 2.90.1, and found it always open a new Emacs GUI window when committing instead of use current Emacs instance directly (the behavior in 2.8.0)....
0
votes
1answer
90 views

Magit Tramp not showing diff window

When using magit on a local file, I stage my changes and I then press c and c again to commit. I get a new window showing the diff and a window for the commit message. I write my commit message press ...
0
votes
1answer
24 views

Magit: display notes in logs

I would like to know, is it possible to write the note added to a commit in the log buffer? That way I don't need to open the commit to read the notes. Thanks!
1
vote
1answer
69 views

magit refresh is too slow

We're talking tens of seconds. In comparison, git status in the same repo is nearly instantaneous. Here is my profiling result on refresh: - command-execute ...
0
votes
2answers
24 views

Magit - How to commit to multiple branches from a dirty working tree

I've got a dirty working tree with changes that are destined for two different branches: The student branch will get documentation with lab problems and some infrastructure. The solutions branch will ...
6
votes
2answers
3k views

How can I do a git diff on the current file with magit?

I'd like to do a diff on the current file / buffer compared to the git repository. Ideally a single function that could be called, or binded to a keyboard shortcut.
0
votes
1answer
45 views

Integrate Magit with ssh-ident

Recently I was looking at utilities for handling ssh-agent at an even higher level, so that entering SSH keys passphrases becomes even more seamless than with the standard ssh-agent utility. One such ...
2
votes
1answer
63 views

(void-function closure) with Magit

I have Magit installed and it used to work fine. However of late, I am running into the following error when I run magit-status. Turning on magit-auto-revert-mode...done run-hooks: Symbol’s function ...
1
vote
1answer
30 views

Auto-refresh magit status only when magit is running

I've seen the post Magit: Auto-refresh “magit-status”, and tarsius recommends the same method from the Magit manual to set magit-after-save-refresh-status to non-nil to the after-save-hook: (add-hook ...

1
2 3 4 5
11