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
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\\'...
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
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?
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?
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
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 ...
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
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, ...
1
vote
1answer
49 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
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
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,...
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 ...
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-...
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
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 ...
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 ...
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
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&...
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 ...
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!
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 ...
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 ...
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)....
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 ...
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 ...
1
vote
1answer
29 views

Magit - problem doing a second commit related to the GIT_EDITMSG buffer

This looks similar (the same?) as How to prevent Magit from saving COMMIT_EDITMSG? but I've also confirmed that the problem isn't magit itself, but interactions with settings or other packages. I'm ...
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 ...
1
vote
1answer
118 views

Emacs Magit not working after OSX Catalina upgrade

Since upgrading my mac to Catalina yesterday, I managed to get Emacs working again after allowing Ruby access to all files in the settings, and most of it works fine, but I can't get Magit to ...
3
votes
1answer
58 views

Magit: Howto create a new commit ignoring white-space differences

I'm using magit 20191128.39 on Emacs 26.3 When changing a python script resulting in a new unstaged change, git/magit should ignore whitespace-differences. A git diff -w will do the trick, but I'd ...
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 ...
2
votes
1answer
58 views

Magit set upstream to origin/master automatically

Is there a way to set the upstream of a branch automatically in magit? I know I can select it interactively but for feature branches I set it to master 99% of the times so I was wondering if it can ...
1
vote
1answer
51 views

Is there a way to add git alias of customized log to magit?

In ~./gitconfig, I have [alias] lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%...
3
votes
1answer
74 views

How to show diffs of merge commits in magit?

When viewing a merge commit it only shows the number of lines changed but no diff. I know that it is possible with git show --first-parent. Is there a way to add an argument to magit-show-commit? I'...
0
votes
1answer
79 views

magit-status open selected buffer change hunk in other window rather then in the same window

I used to have this functionality using code below: (setq magit-display-file-buffer-function (lambda (buffer) (setq current-prefix-arg t) (magit-display-file-buffer-traditional ...
2
votes
1answer
201 views

How can I turn off magit's warning that a commit message has a second line that is non empty?

Every time I have a second line in a commit message, magit prompts/warns me when commiting... Is there a way I can turn this off warning? I've found the following in the docs https://magit.vc/manual/...
1
vote
1answer
157 views

How to let Magit highlight changes

I've been using magit for a couple of weeks now and I really really like it. There is, however, one thing I still can't get to work, which is the highlighting of changes. In the pictures used in the ...
2
votes
1answer
72 views

Browse line range of file in GitHub with Magit

Is it possible to select a range of code and open it in GitHub using Magit? I use the browse-at-remote package for this, but I wonder if this could be done from Magit. I'd like to navigate both from ...
1
vote
1answer
58 views

Unstaged changes not appearing in magit, plus other oddities

I'm a Magit rookie and finding it is not behaving as expected. I have multiple unstaged changes in a repository (see "Git Status" below). However, Magit is not showing them (see "Magit" below) when I ...
0
votes
1answer
32 views

Magit log: move cursor to the HEAD

While in the log buffer, is there a way to move the cursor directly to the HEAD commit?
1
vote
1answer
105 views

Updating magit today gives me invalid face attribute

Updating magit this morning I now can't start things up, getting: face-attribute: Invalid face attribute name: :extend Anyone know what could cause and (hopefully!) fix this?
0
votes
1answer
63 views

Magit pull with merge/rebase from upstream/pushRemote

I have upstream set to the develop branch (say origin/master) and pushRemote to a feature branch. I currently use pulling with preserving rebase. I would like to setup magit in such a way that: ...
0
votes
1answer
27 views

Magit doesn't prompt for SSH key after OS upgrade?

Q: magit no longer prompts me for my ssh key when pushing/pulling; how do I fix it? After an OS upgrade (Lubuntu 19.04 to 19.10), I can no longer push to origin from magit. Pushing to origin results ...
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
36 views

Prevent magit-status from closing hunk preview window when magit-status buffer close

I configured magit-status to open selected buffer change hunk in other window rather then in the same window with: (setq magit-display-file-buffer-function (lambda (buffer) (setq ...

1
2 3 4 5
11