Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 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 ...
  • 67
1 vote
1 answer
32 views

In Magit, how can I quickly diff changes in the current file since my last own commit?

When collaborating with others, I often need to check what others have changed in a file since I last worked on it. Is there an easy way in magit to do this? I.e. show the diff between my last own ...
  • 2,500
0 votes
1 answer
13 views

How to change the commit associated to a tag on a branch that has already been pushed to GitHub?

I have attributed a tag called origin/v0.4.9 for a specific commit on a GitHub Pull Request. I thought the PR was simple, stable, and "a certainty" to be merged really fast. I was wrong. I ...
0 votes
1 answer
12 views

When a merge-conflict happens and two options are shown, what is the magit command that allows the user to easily pick one of them?

Suppose a merge conflict happens. There are two options shown the upper (in red) and the lower (in green): I would like to avoid complex ediff-mode stuff to pick one. I have seen some tutorial where ...
0 votes
0 answers
16 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-...
  • 980
0 votes
1 answer
24 views

Why I can't solve this merge conflict on Magit?

I am working on a feature via Pull Request. While I was working, main branch evolved. Now, I want to put my changes on the Pull Request on top of latest main branch. This means I want to rebase. Hence,...
0 votes
1 answer
21 views

Toggle visibility of unchanged files in magit-status

I want to rename a number of tracked but unchanged files via magit. I know that I can use R (magit-file-rename). However, magit-status does not show me unchanged files. How can I toggle the visibility ...
  • 291
0 votes
0 answers
10 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 ...
  • 67
2 votes
2 answers
38 views

When I do `magit-process-buffer` (`$`) it shows an ellipsis (`…`). What is behind the `ellipsis`?

I wanted to investigate the difference between magit-branch-and-checkout (b c) and magit-branch-spinoff (b s), so I invoked the Magit output buffer with $. I see the following output: 0 git … ...
1 vote
1 answer
34 views

Can I tell magit to show untracked files with a repo .git/config that tells it not to?

In my repo's .git/config I have status.showUntrackedFiles set to no (for performance, because it's a very large repo). However, sometimes (e.g. before I push to remote) I'd like to manually check, ...
  • 113
0 votes
0 answers
46 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 ...
1 vote
0 answers
10 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
0 votes
1 answer
26 views

In Magit, is it possible to know when an unstaged change happened? How to find that information?

I have a repository under version control and I am using Magit as an interface to git. I can see one unstaged change in a file after executing magit-status (C-x g). This means the file was changed and ...
1 vote
0 answers
16 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?
0 votes
1 answer
16 views

Why while being in a local branch I can't pull into a local branch from another local branch with no potential for merge conflict? "No match"

See the picture below: I am in a branch called 430-toggle-hide-show-colums (in green). This is a local branch pushed to GitHub as P.R. draft (not yet merged). Accidentally, I ended up doing ...
0 votes
0 answers
17 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 ...
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-...
0 votes
1 answer
21 views

How can I activate truncate-lines in magit only

I want to long commit messages to be truncated rather than wrapped around in magit buffers only because I can simply open a commit to see the full message. I tried (add-hook 'magit-mode-hook (lambda ()...
  • 210
0 votes
0 answers
106 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
71 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-...
1 vote
1 answer
37 views

Git in Emacs: Possible to Display Current User Identity for Repo?

Background I use multiple Github accounts on one computer. To make sure that the name and email addresses (which I will call User Identity from here) associated with a commit match up to the name on ...
0 votes
1 answer
14 views

How can I use 'transients' in 'magit' to enable case-insensitive search?

I got it working a year ago, then my machine died. I've been unable to figure out the interface to transient. When I view the levels (green and red, with numbers in them), I hit '-i' but see an error '...
1 vote
1 answer
60 views

How to do a "git fetch --all --tags" in Magit?

I would like to pull changes from an upstream repository. More specifically, I would like to pull all the tags that were introduced. On the terminal, I can do: $ git fetch --all --tags On Magit, ...
0 votes
0 answers
169 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,577
0 votes
0 answers
24 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 ...
  • 191
0 votes
1 answer
38 views

How to display commit signature information in Magit Rev mode when visiting a commit?

Magit displays signature information in the magit-revision buffer when visiting a tag, but I can't seem to configure this behaviour when visiting a commit using the default bindings for magit-visit-...
  • 231
0 votes
0 answers
19 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
2 votes
1 answer
59 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 ...
0 votes
1 answer
23 views

Which option should I choose when executing "i' (Ignore) on Magit? Should Gitignore be shared in private, at the top level or in subdirectory?

I keep my emacs init file under version control. See the GitHub. I have the things installed from ELPA also unver version control. Which is annoying. After executing Magit status, I have: Head: ...
0 votes
1 answer
21 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 ...
1 vote
1 answer
112 views

Make Magit ignore certain files already added to git and to .gitignore

This question is related to this previous question. These two files below are under version control which causes some inconvenience in magit-status: Unstaged changes (2) modified .emacs.d/projectile-...
2 votes
1 answer
307 views

How to properly use Magit Fixup?

I am trying to use the Fixup feature on Magit. I will list a recipe to what it is happening: (i) - I have a project under version control. (ii) - My first commit is: 1f61d09 * first commit: add file ...
1 vote
0 answers
62 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 ...
0 votes
1 answer
95 views

In Magit, what is the difference between stashing "index", "worktree", or "both"?

Honestly, I have always picked both and it has worked out so far. But I do not know in which concrete cases it would be better to pick one over the other. It would be good to see examples. I tried ...
1 vote
1 answer
61 views

How is the history.el file written? Why did this change happen?

I have been tweaking my config file (init.el). This file is inside a .emacs.d directory which is under version control by Git. I also use Magit a lot. After editing my config, I was going to stage, ...
2 votes
1 answer
50 views

How to insert a flyspell hook on Magit via `use-package` declaration?

I am rewriting my Emacs config file to fully use use-package and organize code. Currently, I have (use-package magit :custom (magit-display-buffer-function #'magit-display-buffer-same-window-...
0 votes
2 answers
150 views

Can't commit in Emacs 29.0.50 , magit 20220412

I'm running emacs version 29.0.50, with the most recent magit and since yesterday I've not been able to create (or amend) a single commit. *ERROR*: Not inside Git repository error: There was a problem ...
4 votes
2 answers
254 views

magit giterror There was a problem with the editor

When I try to commit C-c C-c with magit, I get this error: There was a problem with the editor '/snap/emacs/1459/usr/bin/emacsclient --socket-name=/run/user/5019/emacs/server'. ... [Hit $ to see ...
0 votes
0 answers
40 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 ...
  • 327
0 votes
1 answer
69 views

MAGIT: easier to read diffs

Is there a way in MAGIT to see diffs as one line instead of two with deletions and additions in one line? It would be much easier to navigate.
1 vote
1 answer
23 views

How do I make Magit use the active window for operations and, on-exit, return the window to the previous buffer?

I am a recent newcomer to emacs, and I have my screen split into 4 windows in a grid arrangement. I'm having some problems using Magit, which is that it spawns (seemingly arbitrarily) in one of the 4 ...
2 votes
1 answer
87 views

Is it possible to do a git clone using Magit in a directory which is not under version control?

Suppose I am in a folder called local-projects. Using the terminal, I can do: [pedro@system:~/quicklisp/local-projects]$ pwd /home/pedro/quicklisp/local-projects An important information to ...
1 vote
1 answer
60 views

How to customize the magit-todo display

I use Emacs to write documentation, and a lot of times my files end up with some internal markup that looks like this: [TK: Where is the event handler defined?] in-line with the text. (“TK” is writer ...
0 votes
0 answers
24 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
1 vote
1 answer
61 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
54 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, ...
1 vote
2 answers
119 views

How to git reset --hard HEAD~1 in Magit?

I accidentally inserted 1 commit in my local master branch. I have not pushed this changed and I want to remove it. This was supposed to be in a new branch. So, I created a new branch based on master ...
2 votes
1 answer
37 views

Is there a "follow-mode" when moving through a magit-log (or similar buffers)?

I have some recollection that there was something like a "follow-mode" for some magit buffers (e.g., magit-log). The idea was that I could pull up a log (e.g., with C-x g l l), put point on ...
1 vote
1 answer
74 views

Using magit-add-section-hook in spacemacs startup

I am attempting to use magit-add-section-hook in dotspacemacs/user-init. (defun dotspacemacs/user-config () ;; Magit pull submodules. Don't know why this fails. (magit-add-section-hook 'magit-...
0 votes
0 answers
21 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 ...

1
2 3 4 5
14