Questions tagged [magit]

is an Emacs extension for the Git version control system.

48 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
222 views

How to deal with user arguments with magit transients?

I understand the infix flags work. However, I'm not sure how best to work with argument inputs. I have read the docs as well as looked at some examples from the magit source code but it's still a ...
  • 617
2 votes
0 answers
22 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-...
2 votes
0 answers
271 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
2 votes
0 answers
71 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
2 votes
0 answers
28 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 ...
  • 7,969
2 votes
0 answers
41 views

How do I jump to the previous/next modification (relative to the git HEAD) in the current file?

How do I jump to the previous/next modification (relative to the git HEAD) in the current file? Ideally, I like sth like swiper that lets me choose to easily jump between modifications.
  • 728
2 votes
0 answers
51 views

APIs to create a custom issue list on Magit Forge?

Using Magit Forge, I'd like to organize a list of open issues by assignee. Ideally I'd like to display them in groups by assignee, but I'd settle for a single list if the assignee were added to the ...
1 vote
0 answers
14 views

Insert a magit-section without refreshing the buffer

I'm experimenting with magit-section as the UI library for an Emacs package. Without going into too much detail, this package interfaces with a websocket and displays the data it receives as an ...
  • 13
1 vote
0 answers
20 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?
1 vote
0 answers
91 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 ...
1 vote
1 answer
98 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 ...
1 vote
2 answers
201 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
1 vote
0 answers
55 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) ...
1 vote
1 answer
105 views

Undo stage hunk in magit

If I accidentally staged a hunk that I wanted a better look at, how do I undo that action (the most recent action). C-/ does not work. Sure I can U to unstage all, but say all else staged is valid.
1 vote
0 answers
58 views

magit status buffer disappears

Magit status used to create a buffer with the buffer name magit: repo name. I recently upgraded Spacemacs and the Magit status buffer started to disappear whenever its window was not visible, and it ...
1 vote
0 answers
253 views

How to reset/undo changes in folder using Magit

I'm looking for a way to undo changes in selected directory, analogue of git checkout [folder-path] in Magit. I found that I can reset changes of specific file to selected branch by typing X f in ...
  • 692
0 votes
0 answers
19 views

Magit doesn't show diff highlighting until hunk is active

I recently started encountering a new issue, and I'm not sure why. When opening a Magit status buffer, the diff highlighting doesn't appear until I select a hunk, in which case it appears for just ...
  • 101
0 votes
1 answer
42 views

Magit `zz` (stash both) does not allow whitespace in minibuffer

Sometimes when using command zz (stash both), the minibuffer to enter a stash message does not allow me to enter whitespace (e.g. space chars). I typically resolve to use dashes or underscores or even ...
  • 208
0 votes
0 answers
9 views

if: Blaming failed due to unexpected output:

Linux Ubuntu 20 Emacs 28.1 I want to create magit-reset-soft I try but get error: if: Blaming failed due to unexpected output: Here steps:
  • 3,718
0 votes
0 answers
16 views

Debug Magit ssh authentication failure over TRAMP

I am using TRAMP to interact with files on a remote Raspberry Pi device from my MacBook. When I SSH into the remote device with the CLI, git is able to find the associated SSH keys and pull/push from ...
0 votes
0 answers
20 views

Getting Magit to Show Word Count Diff

I'm aware that by setting (setq magit-diff-refine-hunk 'all) we can get magit to show the words added/changed: Question: Is there a way to force the display the total number of words added, total ...
  • 849
0 votes
0 answers
49 views

MAGIT: How to show 2 side-by-side window of only changes, not whole document

Once in the Magit buffer, hit E, choose the diff and when they're displayed then switch to vertical mode with |. So far so good. However, this shows three panes, not two. How to show just current and ...
  • 135
0 votes
0 answers
26 views

How to hide tag in `magit-log`

Please see the screenshot of my magit-log-branches: I encounter some projects has lots of tags on each commits, and this situation cause each lines in magit-log tooooooooooooooo long and the magit-...
  • 1,000
0 votes
0 answers
16 views

MAGIT: log: finding expressions in committed files and showing lines containing it, not just commit list

I tried to find how to do this unsuccessfully: When using the search option in MAGIT (l l -G) to search changes, the result is a list of commits that contain such expression. Is there a way to show ...
  • 135
0 votes
0 answers
79 views

Magit cannot commit. emacsclient on PATH. Pop! OS

magit-status sees the repo just fine, and I can even push to Github, or make a branch. I can also commit through the git cli no problem. However, before I can even write my commit message on magit I ...
0 votes
0 answers
19 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 ...
0 votes
0 answers
218 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
126 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-...
0 votes
0 answers
467 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,718
0 votes
0 answers
33 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 ...
  • 201
0 votes
0 answers
33 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 ...
  • 131
0 votes
1 answer
36 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 ...
  • 121
0 votes
0 answers
48 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 ...
  • 347
0 votes
0 answers
27 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
55 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, ...
0 votes
0 answers
74 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
0 votes
0 answers
97 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 ...
  • 208
0 votes
0 answers
26 views

Using with-editor and custom key bindings

I am trying to use the with-editor package with the kubectl edit command in the kubernetes-el package. I proposed a patch for the same. I am trying to understand how to create custom key bindings like ...
  • 241
0 votes
0 answers
512 views

Add remote from magit for new repo

When creating a repo on a git server and wanting to push your existing local repo for the first time, how do I set the remote? M a seems to not like me inputting the url, or a name like "origin&...
0 votes
0 answers
47 views

Howto detect whether ssh server is online from elisp

When using magit-gerrit for git gerrit reviews and magit-gerrit-ssh-creds is set then magit-gerrit assumes that there is a gerrit server and tries to connect to it using ssh subprocess. The problem is ...
0 votes
0 answers
55 views

Duplicate headllines in org mode in CentOS

CentOS 7 Emacs 27.1 Magit Here my folder with org mode files: I open current.to.do.org and it success open. As you can see the first headline is ANDROID and last headline is TESTING. Nice. Now I ...
  • 3,718
0 votes
0 answers
59 views

Remove stale buffers after switching to a different branch

This is the scenario: Switch to a new git branch Open some "new files" in that branch Switch back to an older branch that doesn't have these "new files" I want these opened ...
  • 554
0 votes
0 answers
153 views

Can magit truncate to 50/72 lines?

A common git style rule says that commit messages should be at most 50 characters long and commit descriptions at most 72. Can magit truncate the lines in the COMMIT_EDITMSG buffer in accordance with ...
0 votes
0 answers
135 views

How to take line from recent commit with Magit

Use Magit to view the log with show diffs (-p). Inspect 4 commit old commit. Navigate to a few lines I've since deleted, but want back my project. I can mark the lines but cannot copy them, which ...
0 votes
0 answers
68 views

How to git stage a just-tangled file in `org-babel-post-tangle-hook`

I want to create a org-babel-post-tangle-hook that does a git stage buffer-file-name. There is a boring technical issue I have, which is that I don't know how to call magit-stage-file from elisp so ...
0 votes
0 answers
61 views

writing a magit function that specifies the repo

I would like to write helper functions in elisp for putting dotfiles under version control using YADM. From their documentation I learned that I could call up the magit status buffer for the YADM ...
  • 111
0 votes
0 answers
76 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__ = ...
  • 385
0 votes
1 answer
97 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 -...