Questions tagged [magit]

is an Emacs extension for the Git version control system.

35 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
45 views

Context-aware username (e.g., git username instead of login name) in time-stamp

I am a total emacs/elisp newbie and I can't figure out how to do this. I have time-stamp-active t with a pretty standard format: time-stamp-format "Last modified %Y-%02m-%02d %02H:%02M:%02S ...
2
votes
0answers
35 views

What's this `slot-missing: Invalid slot name: "#<forge-database forge-database-156f3376b4d8>", :file`

I somehow messed up my magit/forge db, and now emacs won't forgive me. Now I can't open magit's status buffer, and sometimes not even a file buffer opens. This is all I can gather from the Messages ...
2
votes
0answers
26 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.
2
votes
0answers
93 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 ...
1
vote
0answers
28 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 ...
0
votes
0answers
12 views

Way to filter/search authors in magit-cherry

Most of the times I have to backport my commits to the upstream for that I need to only check the cherries which were authored by me, is there a way I can narrow them by the C-sing the author name? I ...
0
votes
1answer
8 views

How to repeat last magit search and modify an option?

Searching through the git log with magit is a breeze. When I do a complex search, I may pass five arguments. If I then realize I want to search again with one option changed, how can I get all search ...
0
votes
0answers
30 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) ...
0
votes
1answer
30 views

Load right version of Git while connecting to remote

I am currently working on a remote using Lmod for handling modules. I want to use Magit with the repositories on this remote, but the default system version of Git is 1.x. However, Git 2.18 is ...
0
votes
0answers
22 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
0answers
18 views

Directory navigation in magit

I have a great experience working with a flat repository structure in magit. I find it more cumbersome to navigate in and out of directory structures when I want to some but not all of the files in a ...
0
votes
0answers
66 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
0answers
20 views

How to run clean-up code once magit has completed a re-base operation?

My emacs customisation has grown some considerable hairballs while I've been writing helpers to update commits. The idea being that when I re-base I can tag all the commits that need updating and work ...
0
votes
0answers
26 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
0answers
20 views

Magit-transient: dynamic choices?

I am trying to make the choices in my transients dynamic but I cannot figure out how. Right now, the choices are only evaluated when loaded. Here's a static example: (define-infix-argument choice-rt ()...
0
votes
0answers
37 views

Automating git rebase and solve conflict

I have a script can solve some conflict on certain file. How can I automate the work flow to do the following? Run git rebase If has conflict, run script try to solve it. Then run git rebase --...
0
votes
0answers
33 views

Use all-the-icons in magit-repolist-column-flag-alist

I am trying to get magit-repolist-column-flag-alist to use icons from all-the-icons.el but with no success. This is the code I tried. (setq magit-repolist-column-flag-alist '((magit-untracked-files ....
0
votes
0answers
47 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
0answers
34 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 ...
0
votes
0answers
30 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
0answers
13 views

How to show full diff when using `Limit to files` in log?

When showing the log, there is an option to limit the log to commits touching a set of files. The log itself is fine, but when I open any commit on the log, the diff of that commit is limited to the ...
0
votes
0answers
55 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
0answers
48 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
0answers
21 views

Smerge: clearer refine mode?

I'm using doom+magit to deal with git, and I have smerge configured to change in-file conflicts. When I enable the smerge refine mode to highligh changes on a per-word basis, I find that refines works ...
0
votes
0answers
20 views

Smerge: auto-resolve LaTeX-like git conflicts

I'm using doom emacs + magit, and it enables smerge for me to display nicely my conflicts. I just saw that smerge has a function smerge-resolve to automatically resolve conflicts. I'd like to use it ...
0
votes
0answers
497 views

Getting the TAB key to work the same in Doom as in Spacemacs

When using the TAB key in a magit status/overview buffer, it says: Buffer is read-only. If I manually disable read-only mode, the pressing TAB indents the text instead of expanding or contracting ...
0
votes
0answers
42 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
0answers
22 views

Local magit revives all stale tramp connections

I'm using long-living emacs sessions using emacs in daemon mode, and I use tramp quite extensively. I usually have several buffers in the background which use tramp, but since my system has been ...
0
votes
0answers
8 views

How to remove all labels from a topic in forge

How can I remove all labels from an issue or PR in forge? When I trigger the edit-label minibuffer and clear its contents, then hit enter, the labels are not removed. I can see that forge is first ...
0
votes
0answers
36 views

Closing magit's visit-file/blob window doesn't return focus back to magit

If Magit's log is open and you hit RET on any of the commits, it opens a visit file/blob window where you can see the diff with some details. There's a few ways to do it, but I believe in Doom Emacs ...
0
votes
0answers
85 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 ...
0
votes
0answers
50 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
0answers
254 views

How to use authinfo credentials with Magit to push/pull to Overleaf

Overleaf allows git for some users. I have been using emacs and magit with overleaf since some time by providing username-password at each git push or git pull. What I want Now I want to configure ...
0
votes
0answers
40 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
1answer
84 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 -...