Questions tagged [magit]
is an Emacs extension for the Git version control system.
48
questions with no upvoted or accepted answers
3
votes
0
answers
384
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 ...
3
votes
0
answers
266
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 ...
2
votes
0
answers
25
views
magit search in buffer, only file names, not contents?
If I run M-x magit I see a big list of staged and unstaged file paths. I want to search through the list of file names, using my usual Emacs command of C-s (isearch-forward). But in this magit buffer ...
2
votes
0
answers
98
views
Hide "^L" in magit log buffer
How can I configure the display in the magit buffer so that "^L^L^L" is rendered as a white space? On other platforms, I'm used to seeing entries separated by whitespaces
magit 20230924....
2
votes
0
answers
100
views
Magit error: Wrong type argument: listp
I recently updated magit and since then I haven't been able to create commits with it.
When I try to create a commit in the magit-status interface, I get the error:
command-execute: Wrong type ...
2
votes
0
answers
24
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
417
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 ...
2
votes
2
answers
352
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-...
2
votes
0
answers
102
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" '("...
2
votes
0
answers
29
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 ...
2
votes
0
answers
62
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 ...
2
votes
0
answers
317
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 ...
1
vote
0
answers
28
views
How can I make magit aware of an upstream branch?
I have a preexisting (github) repository with 2 branches: master and release. I successfully set my own local copy of the master branch to origin/master but when I try to set the release branch (using ...
1
vote
0
answers
54
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 ...
1
vote
0
answers
63
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
vote
0
answers
28
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 ...
1
vote
0
answers
29
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
137
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
0
answers
68
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
2
answers
172
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.
0
votes
0
answers
17
views
Unknown fix for error: cl--generic-build-combined-method: Cyclic definition: %S: loadhist-unload-element
I'm using emacs 27.2 and magit version 20231109.935. When I'm inside a directory and try to run magit-status or magit-init I get the error message in the title:
cl--generic-build-combined-method: ...
0
votes
0
answers
18
views
Magit: How turn SHA1's in commit messages into links?
Is there a way in magit to turn SHA1 hashes in the commit-message body into a clickable link? (currently it's necessary to click on the SHA1 and press Enter).
Related to: How to follow commit hashes ...
0
votes
0
answers
18
views
Two pushurl failed with `magit-push-current-to-upstream`
I have two pushurls, say owner1 and owner2, set to a remote.
$ git remote -v
origin https://github.com/owner1/repo (fetch)
origin https://github.com/owner1/repo (push)
origin https://github.com/...
0
votes
0
answers
106
views
Using Windows git.exe with Magit on WSL2 Hangs on commit
I currenlty run emacs-nox on WSL2. My workflow is as such:
[Gentoo Linux Host] –ssh–> [WSL2 Ubuntu 22.04.2 LTS (Windows VM)] –open–> [emacs] –edit–> /mnt/c/<Path>/<Files>
There is ...
0
votes
1
answer
50
views
magit log with more complex glob pattern for --remotes argument
I want to add a custom log option via (in init.el after some require magit package introduction):
(defun magit-log-my-stuff (&optional args files)
(interactive (magit-log-arguments))
"...
0
votes
0
answers
37
views
Unable to commit in Magit in a repo on an NTFS filesystem
My situation is similar to this question: I have a git repository on an NTFS volume mounted on Linux (Ubuntu). Using Magit I am able to see status, stage and unstage, but committing doesn't work and ...
0
votes
0
answers
74
views
How do I pop/apply selecting a file or hunks from file in stash using Magit?
I need to select some files or hunks in one file in existing stash entry unsing Magit?
How can that be done,what keys to press after Z (magit pre-command)?
0
votes
1
answer
57
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 ...
0
votes
0
answers
23
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:
0
votes
0
answers
51
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
28
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 ...
0
votes
0
answers
169
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
246
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
1k
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 ...
0
votes
0
answers
79
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
102
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 ...
0
votes
0
answers
136
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 ...
0
votes
0
answers
30
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 ...
0
votes
0
answers
893
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
51
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
58
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 ...
0
votes
0
answers
70
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 ...
0
votes
0
answers
220
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
169
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
74
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
76
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 ...
0
votes
0
answers
85
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__ = ...
0
votes
1
answer
104
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 -...