We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [magit]

is an Emacs extension for the Git version control system.

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

Magit pull with merge/rebase from upstream/pushRemote

I have upstream set to develop branch (say origin/master) and pushRemote to feature branch. I currently use pulling with preserving rebase. I would like to setup magit in such a way that: this ...
0
votes
1answer
12 views

Magit doesn't prompt for SSH key after OS upgrade?

Q: magit no longer prompts me for my ssh key when pushing/pulling; how do I fix it? After an OS upgrade (Lubuntu 19.04 to 19.10), I can no longer push to origin from magit. Pushing to origin results ...
2
votes
4answers
397 views

Set author per repository

I work on both work and personal projects on my machine, and for my work projects, I prefer to use my work email, and vice versa. In shell, I use direnv to set GIT_COMMITTER_EMAIL and ...
1
vote
0answers
45 views

Extra carriage-return on magit path

I'm having a little trouble with magit and the default-directory variable. When calling M-x magit-status, an exception is thrown - Setting current directory: No such file or directory, /path/to/git/...
10
votes
1answer
509 views

Magit custom commands

Magit displays the progression of multi-step commands with popup windows. For example, pressing c brings up the commit menu, whence pressing a will invoke magit-commit-amend. I would like to include ...
2
votes
1answer
13 views

Prevent magit-status from closing hunk preview window when magit-status buffer close

I configured magit-status to open selected buffer change hunk in other window rather then in the same window with: (setq magit-display-file-buffer-function (lambda (buffer) (setq ...
1
vote
2answers
65 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 ...
2
votes
1answer
257 views

Always show expanded Magit sections by default

Sometimes the sections such as "Recent commits", will be closed by default. Can I set it so they are all always open by default? But before I made the commit, recent commits was opened. After the ...
1
vote
1answer
42 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 ...
5
votes
1answer
37 views

What is the equivalent of doing a plain `git reset <sha>` in magit?

I sometimes want to undo a commit without losing the changes, but just placing them back into an uncommitted and unstaged state. To do that at the cli, I do just git reset <sha-of-previous-commit&...
1
vote
1answer
26 views

How to show commit authors in Magit section “Recent commits”?

The "Recent commits" section in the status view shows short commit checksums plus the subject of the commit. How can I also show the author of each commit?
1
vote
1answer
16 views

Add a group of options in a Magit transient

I would like to add a group of options to a transient, but I cannot figure out the POS parameter I should use. (transient-append-suffix 'magit-push "-n" ;; after the last option of the first group [...
0
votes
1answer
35 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: ...
1
vote
2answers
39 views

what to do with “magit-wip-commit-worktree: Cannot read tree refs/heads/master”?

When I commit via magit I get: magit-wip-commit-worktree: Cannot read tree refs/heads/master while it commits ok. But the message frightens me. There seems to be nothing wrong with the repo: $ ...
8
votes
3answers
2k views

Get git repo root directory, preferably with magit

How can I get the root directory of the current git repo? I could run shell-command-to-string on something like git rev-parse --show-toplevel. Is there a better way? Does magit or any other git front-...
0
votes
1answer
59 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
23 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
53 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 ...
13
votes
4answers
497 views

Magit: How to show differences within lines

I have a file, I make some changes. Here how SmartGit shows differences. As you can see it shows where the difference is within the line. It changes background to red color in concrete position. And ...
1
vote
1answer
35 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
45 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
51 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
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 ...
3
votes
1answer
56 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 ...
0
votes
1answer
55 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?
2
votes
1answer
46 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
151 views

Magit pushing through tramp does not work

Hi guys I'm on a osx machine and I want to push commits from a remote machine through tramp to github. I open the directory in dired on the remote machine which works fine and type M-x magit status ...
0
votes
1answer
52 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 -...
0
votes
1answer
51 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 ...
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 ...
43
votes
2answers
6k views

How to list branches with Magit

How do I list the branches of a repository in Magit (i.e., the equivalent of git branch --list)? I expected to find this in the branch popup, but it seems to be neither there nor was I able to find it ...
0
votes
1answer
118 views

Track org-mode headlines separately with version control

I want to setup a personal wiki in Emacs org-mode. And I want to put this under version control, so that I can see the history of each article, as it evolves. If I use a single file for my wiki, with ...
1
vote
1answer
47 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
48 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 ...
1
vote
2answers
148 views

Yasnippets won't expand in git-commit-mode?

I have written a snippet for git-commit-mode. However when I'm writing a commit message (from Magit), the snippet won't trigger. Does anyone know how to fix this? I have yasnippet version 20160924....
0
votes
1answer
62 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
1answer
28 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
0answers
48 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 ...
0
votes
1answer
43 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 "...
3
votes
1answer
54 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
42 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
46 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
67 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
139 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
1answer
65 views

Magit status wired output (control sequences)

When I use magit on a RHEL 7 box today, it gives me this output when checking magit-status: Not sure what went wrong. Magit-version output is: Magit 2.11.0, Git 2.14.1, Emacs 25.3.1, gnu/linux The ...
0
votes
0answers
16 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
119 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
34 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 ...
14
votes
2answers
4k views

Magit extremely slow in Windows. How do I optimize?

I am forced to use Windows 10 for a project. Yes, I would rather use GNU/Linux. To keep my sanity, I've tried to regard Windows as a bootloader for Emacs :) Unfortunately, Magit (one of my favorite ...
2
votes
2answers
2k views

magit-stash-create: Cannot save the current index state

I'm using magit 20160517.838, Emacs 25.0.50.2 I just upgraded magit from 20160320 to 20160517 and when I try to stash I now get this issue; magit-stash-create: Cannot save the current index state I ...