Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
1
vote
1answer
21 views

Initializing forge-alist

I am trying to initialize Magit Forge's forge-alist programatically. Therefore I put together my first couple of emacs-lisp code. It looks like the following: (let ((gitlab-install (lambda (host) (...
0
votes
0answers
26 views

Magit continues despite pre-commit hook failing

I have a pre-commit hook in git that returns nonzero on some "fatal" QA checks. When using git commit on the command line, git bails out. However, when trying the very same commit in Magit, ...
0
votes
1answer
28 views

How to apply a hunk of changes in diff to current branch?

I have two branches, let's say branch a and b, I would like to apply some changes from b to a. Note that I use magit-diff to show the differences between the two branches. Then I would like to apply ...
1
vote
0answers
15 views

Is it possible to apply `smerge-keep-mine` for all the conflicts by using a single keybinding?

I am using smerge to resolve conflicts in order to apply merge. I am applying one by one for smerge-keep-mine to all conflicts, which I belive equivalent for git merge --strategy-option ours [Q] Is it ...
1
vote
1answer
36 views

How to keep magit from prompting me for my GitHub username

I'd like to configure magit so that it does not prompt me for my GitHub username when it needs to interact with GitHub in some way (like, say, when doing a push). My GitHub username is already in the ...
0
votes
1answer
31 views

Magit: cannot commit error, unsure why

I am getting the error below and I have no clue what could be causing this. Any help is greatly appreciated: 1 git --no-pager --literal-pathspecs -c core.preloadindex\=true -c log.showSignature\=...
0
votes
0answers
13 views

Force magit to ask for confirmation before deleting a branch

I would like to have magit ask for confirmation when I've told it to delete a particular branch. Currently it seems that magit considers the selection of a branch to delete to be the confirmation, as ...
0
votes
0answers
20 views

Magit git commit isn't working on spacemacs

After installing Magit in spacemacs. I used Helm to create a git repository. I added some files to stage then tried to commit. Let me know if I'm doing something wrong or it's just an issue. I get: ...
1
vote
1answer
47 views

How to create an annotated tag with an empty message in Magit?

Objective Create an annotated tag with an empty message, as would be created with the following command. $ git tag --annotate epic-tag --message="" Attempts Create it with M-x magit-tag<...
0
votes
0answers
25 views

magit, understand magit-blame

When I enter magit-blame it shows the following lines. jihae 2020-04-07 14:51 불필요한 파일 삭제, yarn 빠진 부분 추가, public path Eugene Kim 2020-06-04 17:50 config process.env.__DEV__ = ...
2
votes
1answer
41 views

Is there a way to see a pull-request review status in magit?

I see I can view the github pull requests assigned to me with forge-list-requested-reviews. Is there a way to see the status of each review? For example I've approved some of the pull requests that ...
1
vote
1answer
28 views

How to set smerge-command-prefix to “\C-cv”

I find the default prefix for smerge-mode C-c^ and I have following setup: (setq smerge-command-prefix "\C-cv") (setq smerge-command-prefix "\C-c\C-v") Also C-c ^ runs the command ...
0
votes
1answer
23 views

Git commit multiple files

When I go to commit my changes VC seems only allows me to commit one file at a time via C-x v v. Is there a way for VC to commit more than 1 file at a time?
1
vote
2answers
47 views

How can I create a new label using Magit forge?

Using Magit Forge, I'd like to create a new label for a new issue. I can edit the Labels field using command forge-edit-topic-labels, but that command accepts only labels that already exist. How can ...
0
votes
0answers
112 views

Syntax highlighting for comments in Magit commit buffers with custom core.commentChar

I frequently source the body of my GitHub PRs from my commits, and thus is makes sense to consider my commits to be made in Markdown (it is nice to have a markup language for commits anyway). Thus I ...
0
votes
1answer
66 views

Unable to push into Github using Magit

When I try to push into my remote repository, the mini buffer says Running git push -v origin master:refs/heads/master but nothing else happens. Following the manual, I have staged, committed, and ...
1
vote
2answers
86 views

Debugger entered--Lisp error: (wrong-type-argument sequencep all) cl-intersection((all magit) all)

I am trying to use magit-delta (https://github.com/dandavison/magit-delta). I am using GNU Emacs 26.3. When I add following line ( (magit-delta-mode 1) )into the .emacs file, I get following error: ...
0
votes
1answer
38 views

Magit remove local branches that were merged into another branch

Explaining the problem more in-depth than the titular definition: Often I merge branches into master and want to prune based on that. M-p works fantastic for removing the remote branches (eg origin/...
0
votes
1answer
45 views

How do I stop magit popups on commit?

When I do a commit, magit popups the diff in a separate wm window. I'd like it to show the diff in the same wm window and just split into a different wm window. I've tried this answer, but it hasn't ...
0
votes
1answer
16 views

Reverting a hunk without refreshing in Magit Diff

Typing v in Magit Diff mode causes an often slow and uncecessary refresh. Can this be avoided? For example when looking at a diff between a range of commits (say origin/mater...HEAD). Typing v (A.K.A. ...
1
vote
1answer
49 views

How to change the default transient level temporarily? (“Show hidden magit commands”)

Many commands that are rarely used in magit are hidden by default. Magit uses the transient.el library for popups and the visibility of infix and suffix commands are controlled by transient-default-...
0
votes
1answer
29 views

Magit Move Submodule

In git bash I can use git mv home/subdir_1/my_submod home/subdir_2/my_submod to move a submodule between directories. Git handles changing .gitmodules and stages the change to be committed. Is there a ...
0
votes
2answers
44 views

magit status and git lfs files diff shows pointer diff

When I call magit-status git lfs files are shown as follows. modified src/myfile @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:...
1
vote
1answer
38 views

git-blame with spacemacs

I'm trying invoke magit-blame in spacemacs. If I do: SPC g b Then I see a "git-blame" section at the bottom which says: Press [_b_] again to blame further in the history, [_q_] to go up or ...
2
votes
1answer
64 views

Magit deprecates `magit-popup`. Which of my packages depend on it?

How do I get Emacs to report which packages in my running Emacs depend on magit-popup? Soon Magit will stop supporting magit-popup because it has transitioned to the replacement transient. Somehow ...
0
votes
1answer
38 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 ...
3
votes
1answer
59 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
59 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
27 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
22 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
37 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
34 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
19 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
47 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?
3
votes
1answer
66 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
29 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
35 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
119 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
21 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
33 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
68 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
39 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
48 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
58 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
43 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
48 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
35 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
35 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
27 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
25 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
2 3 4 5
12