Questions tagged [magit]
is an Emacs extension for the Git version control system.
44
questions with no upvoted or accepted answers
3
votes
0
answers
157
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 ...
3
votes
1
answer
51
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
0
answers
20
views
How to force a git checkout revision in Magit if there are unstaged changes?
On the terminal, in a repository with unstaged changes, I can do:
~/projects/introduction-to-clojure$ git checkout -f 3.7
Branch '3.7' set up to track remote branch '3.7' from 'origin'.
Switched to a ...
2
votes
0
answers
54
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
26
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
32
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
0
answers
38
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
34
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
2
answers
80
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-...
1
vote
0
answers
41
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
60
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
50
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
158
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
0
answers
5
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 ...
0
votes
0
answers
29
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 ...
0
votes
0
answers
19
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 ...
0
votes
0
answers
34
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 ...
0
votes
0
answers
49
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
20
views
MAGIT: is it possible to visualize only deleted portions of commit?
As part of my workflow with Magit, I like checking the red parts (deleted) changes of my commits visually quickly when committing in Emacs, given that in Emacs I must be careful not to chunk huge ...
0
votes
0
answers
20
views
Limit magit-log-all
I'm using magit on Emacs 27.1 on a project with a lot of commits (27000). When I first start magit-log-all it shows about 80 commits which is fast, but if I increase the log for any reason then next ...
0
votes
0
answers
118
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 ...
0
votes
0
answers
39
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
41
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
15
views
Jump to last staged hunk
Inspired by this question and workaround:
...stage the whole hunk, and then unstage the line which you don't want...
How do you jump to the last staged hunk in Magit?
0
votes
0
answers
10
views
Let `magit-insert-local-branches` sort branches according to the branch.sort configuration
Is it possible to configure magit to sort branches inserted with magit-insert-local-branches into the main status page according to some criteria, for example whatever is configured as branch.sort in ...
0
votes
0
answers
24
views
How can I disable `diffing` in magit during git commit?
When I commit using magit (git-commit-mode) shows following message Diffing changes to be committed (C-g to abort diffing) in the mini-buffer before typing the commit message.
Would it be possible to ...
0
votes
0
answers
50
views
Magit is slow in a repository with many merge commits
This is one of the many company's repositories, and the apparent difference between this one and many others that work more or less fine is that it has a huge number of merge commits. The way CI is ...
0
votes
0
answers
29
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
1
answer
71
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
0
answers
24
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
31
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
0
answers
191
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
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
0
answers
43
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
52
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
0
answers
50
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
34
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
91
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
85
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
54
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
58
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
392
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
0
answers
52
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
96
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 -...