The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
0
votes
0answers
22 views

Magit merging changes manually

When I do merge preview m p I see a log of other branch changes for each affected file. Changes marked like this: @@ -20,6 + 22,7 @@ - <change> + <change> To merge only a ...
0
votes
1answer
36 views

Magit set upstream origin

I'm having trouble understanding how Magit handles pushing local branches to remote I create and checkout a new branch with b c. I make some arbitrary change, and save returning to magit with C-x g ...
0
votes
1answer
20 views

Magit status Recent commits foreground color

I have a terminal with a dark background color. Magit shows recent commits and uses a dark color for the commit hashes so I can't see them. I tried customizing frame-background-mode to be dark but the ...
2
votes
1answer
45 views

Magit-todos warning: File is too long, consider excluding it from scans

Whenever I do something in Magit buffer I get this warning: Warning (magit-todos): File has lines too long for Emacs to search. Consider excluding it from scans: path/to/file In particular it ...
1
vote
0answers
39 views

Problem Committing with Magit

I'm a relatively new convert to emacs and a very new convert to Mac. After installing Emacs using the ESS installer (Version 18.10.2). When I attempt to state a file for commit I receive the ...
1
vote
1answer
31 views

Cannot get Magit to show the commit signatures in the log

In order to prove that I had a signature on a commit I needed to use a this command line command: $ git log --show-signature -1 I could not get Magit to display the signature I tried to use the ...
0
votes
1answer
35 views

magit commit does not permit adding a gpg signature

I am failing to run gpg to sign commits, after doing so successfully before an upgrade to Mojave and an upgrade to Emacs. (I am not sure when I lost the ability to sign files in the past year.) When ...
4
votes
1answer
43 views

Can magit pull hunks from another commit into my branch?

I have a big commit on another git branch. I'd like to "cherry-pick" some hunks from that commit into my current branch. I bet magit can do that, but I'm not sure how. Anyone? (I've seen ways to ...
0
votes
1answer
34 views

magit-checkout does not update current buffer

When I checkout an existing remote branch, the current buffer remains on the old branch. However if I open a new file, that new file is on the checked-out branch. My current workflow is this: ...
3
votes
1answer
54 views

magit: how do I turn off the -S (--gpg-sign) argument when committing? [closed]

I forgot my GPG key at home and want to check in the code until I am home and can amend/resign the commits. Unfortunately I can't seem to figure out how to disable the --gpg-sign= argument in the ...
2
votes
1answer
41 views

View file diffs in merge commits

When I open the commit view for a regular commit in magit, I can see the diff for each file. When I open a merge commit, I can only see a summary of the number of lines that were changed. Is there a ...
0
votes
1answer
47 views

Maximum total length for commit message with Magit

I know that it's possible to limit the length of the commit message's first line with git-commit-summary-max-length, but is there a way to limit the total number of characters in a commit message?
0
votes
1answer
60 views

Use magit to find out who wrote the line at point and when

Someone showed me how to do this with "ruby mine" but I don't use ruby mine so hoping emacs / magit can do this. A file in a git repository is opened up in emacs. Point is at line 23, and you want to ...
0
votes
1answer
73 views

Can magit put my commit somewhere up the tree?

I have a rough part of my workflow, wondering if magit is the solution. So when I'm working on a task, I spin off a branch like most people. I end up putting 5 or 6 commits in a branch that's for my ...
0
votes
1answer
44 views

How to set magit recent commit always expand when i open magit status?

When I open a Magit status buffer, then the recent commit section is closed, I need to use TAB to expand it. How can I configure it to always be expanded.
0
votes
1answer
44 views

Magit popup doesn't open in status buffer

Every time I accidentally update Magit to a new version, I come to regret it. :( Today, I discovered that the popup window doesn't work well anymore: instead of opening in the same buffer as the ...
0
votes
1answer
26 views

Setting mode-line font size and Magit diff colours

I'd like to adjust the background colour of the part of the diffs displayed by Magit. In particular, the background colour of the text 1st, 2nd, and 3rd in the image. I'd like to increase the contrast ...
0
votes
1answer
61 views

Pushed commit doesn't appear on Github

I tried updating a repository about 30 minutes ago with only 3 lines being different and it has yet to show up as a commit on Github. Is it typically this slow? It shows that it went through and ...
0
votes
0answers
34 views

Use ssh-agent's SSH_AUTH_SOCK value, not macOS' one [duplicate]

When I run (getenv "SSH_AUTH_SOCK"), I get "/private/tmp/com.apple.launchd.K9OEFgxDgw/Listeners". I want to set it to the value that is returned by echo $SSH_AUTH_SOCK on the command line which is ...
3
votes
1answer
52 views

magit ediff conflicts wordwise

During a magit-rebase I'm running into conflicts on single long lines, where I'd like to take some parts of the line from the A and some from the B buffer. After hitting * -refine current region ...
1
vote
1answer
40 views

CUA doesn't work in magit status buffer

The title is basically everything what I know. CUA keys just don't work in magit status buffer. In older versions, it worked. Sometimes. Now it consistently just doesn't work. Emacs 26.2. Newest ...
0
votes
1answer
41 views

How can you configure magit for duet-commit?

The following code used to work with earlier versions of emacs, adding a ‘d’ option to magit's commit popup for ‘git duet’. (require 'dash) (defvar magit-duet--default-commit-popup-actions nil "...
0
votes
1answer
44 views

How to disable `git-rebase-mode` after magit is installed?

I'd rather use regular text editing functions when rebasing instead of learning magit's bindings. Is there a way to use magit but disable git-rebase-mode?
1
vote
1answer
65 views

How to change window splitting behavior in Magit?

emacs: 26.2 spacemacs: develop (19c429e) magit: 20190609.1424 Some time ago (e.g. 20190222.1746), magit's window management used to be different from how it currently is. For example, magit-status ...
3
votes
1answer
119 views

How to diff one file against another branch with Magit

I want to see the differences of a file in another branch. With git I can simply do: git diff otherbranch: path-to-file. In magit this seems trickier as the file may not be dirty and not showing up ...
0
votes
0answers
15 views

Magit is not able to render the font [duplicate]

I am trying to use Magit but whenever I tried running it, somehow fonts are not rendered properly. I am using MacOS and below is the init.el config. I am using powerline font (Meslo) (use-package ...
2
votes
2answers
115 views

What's this `slot-missing: Invalid slot name: “#<transient-prefix transient-prefix>”, :incompatible`

After updating to magit 20190517.1750 from ELPA, I've got this warning slot-missing: Invalid slot name: "#<transient-prefix transient-prefix>", :incompatible which breaks a lot of magit ...
0
votes
1answer
31 views

How do I select 'flag' options for magit through helm?

I'm using spacemacs with helm and magit. There are some options, for example, the ability to sort log entries in reverse order, that have a flag by them. I don't know how to select any of these ...
0
votes
1answer
30 views

How to reproduce `git push -u` behavior, that is, auto-set local branch as the new remote or push branch?

No matter how I fiddle with magit options, I cannot reproduce the following behavior: I checkout origin/master. I create a new feature-branch on top of it; its name is unique. I make changes, add ...
0
votes
1answer
20 views

How to close the current frame automatically after aborting the commit

For editing messages, Magit opens a frame. It disappears if I finish the editing session, but it stays if I choose to cancel the session. In the latter case, I have to manually close the frame. So I ...
2
votes
0answers
14 views

How to prevent magit with ivy from selecting an author email address? [duplicate]

I have a git repository containing commits with 3 of my email addresses. When I try to view the log and filter by author (-A) and then enter a few letters of my last name, I see a list of the 3 email ...
0
votes
1answer
28 views

How to specify multiple patch files to be applied by Magit?

The Magit user manual says in the description of `w w' (magit-am-apply-patches): w w (magit-am-apply-patches) This command applies one or more patches. If the region marks files, then those ...
0
votes
1answer
42 views

Magit blame only last commit (or range of commits)

Can I have magit-blame somehow only show the changes introduced with the last commit? EDIT: what have I attempted? I've looked at the docs of magit-blame and explored all flags in the magit-blame ...
0
votes
1answer
49 views

Magit Tramp not showing diff window

When using magit on a local file, I stage my changes and I then press c and c again to commit. I get a new window showing the diff and a window for the commit message. I write my commit message press ...
2
votes
1answer
81 views

How to delete ^M in the diffs of Magit?

I had an issue with a file that had inconsistent line ending. My file would show a ^M for every line ending. I ran into this article that shows how to get rid of the ^M character and set the buffer ...
1
vote
1answer
44 views

Package to help display status of each git repo contained in a common directory

I have a directory and in the directory is a rather long list of git repositories. Is there a package or options where a dired listing of the directory would also add in the status of each git repo ...
0
votes
1answer
74 views

How to integrate Emacs + Lab + Magit

I'd like to use lab hub wrapper for handling mr/issues of my own custom gitlab server. When I open a pull-request using hub (github) it's works fine the git-commit-mode from magit, syntax highlight ...
0
votes
1answer
80 views

Run a function before/after magit runs git

I'd like to run a function before magit runs git, and another one after magit runs git. I see magit-pre-start-git-hook but I don't see any post-finish-git hook. How can I run commands before and after ...
0
votes
1answer
765 views

Use magit to display the difference between two branches

Is there a way to bring up a big list of the differences between specific commits across two branches? I tried the method described in this answer but it came back empty, I assume because the ...
2
votes
1answer
120 views

Mode-line not updated after checking out new branch using Magit

I create and checkout a new local branch via magit. Pressing M-x magit-status then b c for branch create and in the magit buffer I see the new name of the branch that I am apparently on. However ...
0
votes
1answer
36 views

magit options when dealing with a failed git-am

I'm not sure if I'm missing something or if this is a missing feature but occasionally when I attempt to apply a patch from my mail box git completely fails to apply it. This isn't a case of ...
0
votes
1answer
125 views

How to ask magit to use external diff and merge tools?

I have set the git variables [merge] and [diff] to the appropriate values like this: [merge] keepBackup = false; tool = p4merge [mergetool] prompt = false [mergetool "p4merge"] cmd = ...
0
votes
2answers
316 views

How to create a new repository on Github from Magit

I am unable to add a remote repo to github if it does not already exist on github. E.g. magit-init Add some files, stage and commit. Then magit-remote-add --> Remote name:github --> Remote url: ...
1
vote
0answers
86 views

Magit throws error when I press “h” or “c” [closed]

I have installed Emacs on a fresh install of Elementary OS, and I have just installed Magit. When I run magit-status in a repository, and press either the c or h key, magit throws an error. The error ...
3
votes
2answers
117 views

Limit magit to showing status of 1 directory

I'm working on a large repo with many folders, and showing the status is slow (just plain git takes a long time). I am really only interested in one directory, how can I constrain magit to only seek ...
4
votes
1answer
111 views

Magit unignore file

When in magit, I pressed i on a file and asked if I would like to ignore the file locally or globally. I chose locally. I assumed that it would write a line in my .gitignore file but unfortunately ...
5
votes
2answers
216 views

Pushing/Fetching all branches at once in magit

Context: I have a relatively small project, in which I use branches to work on new features, so that when I'm finished, then I manually merge branches as I need. I usually keep the same exact copy of ...
2
votes
1answer
130 views

How to modify fringes only for magit mode?

I have tried: (defun my-change-fringes () (set-window-fringes (selected-window) 20 0)) (add-hook 'magit-mode-hook 'my-change-fringes)) The problem seems to be that when I open a magit buffer for ...
-1
votes
1answer
84 views

Magit: add a full directory with magit-status

How can I add a full new directory with magit-status? When trying to stage a new directory from the magit-status buffer, pressing s, I can only add individual files within the directory, but not the ...
3
votes
1answer
93 views

How can I diagnose which `git` magit is running?

I'm trying to use Magit with TRAMP. The remote host has multiple git versions, necessitating (add-to-list 'tramp-remote-path "/usr/sup/bin") in my .emacs. However, when I run magit-status in a ...