Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
3
votes
1answer
170 views

git rebase -x (“exec”) with Magit?

Is it possible to use the "exec" mechanism when rebasing with magit? From the git rebase man page: -x <cmd>, --exec <cmd> Append "exec <cmd>" after each line creating a ...
3
votes
1answer
398 views

magit: display the commit log around the commit I'm interested in

How can I jump to the commit log around the commit I'm interested in? I use magit-blame a lot while reading the history of a project. While doing that, I RET to see the commit that changed the line ...
3
votes
1answer
124 views

Encoding in buffers not associated with files

I use Magit to manage Git repositories. Some of these repositories have collaborators whose names contain accented characters. In a freshly-started Emacs, everything looks fine. In a long-running ...
3
votes
1answer
222 views

Is there a way to view summaries of multiple repositories

I'm using a small script like for d in $HOME/Repository/* ; do if [[ -n "$(git -C $d status -s)" ]] ; then emacsclient --eval "(magit-status $d)" fi done to open repositories that ...
3
votes
1answer
251 views

Magit popups no longer behaving as popups (in my setup)

I like to have my emacs set up as one full-screen frame with two side-by-side windows at all time. To do this, I've used this code to force emacs not to split windows arbitrarily: (defun never-split-...
3
votes
1answer
149 views

How to get the commit history for a specific developer in Magit?

Using the command ll in magit would get the complete commit history, but how can one show only the commits by an individual developer? I checked the cheetsheet but can't find a valid solution.
3
votes
1answer
63 views

Retain point in magit while staging hunk by hunk?

I am trying to stage few hunks of a file using magit. My point is on first hunk like this Now if I press s to stage this hunk, it will stage hunk and moves point back to file like this Now to stage ...
3
votes
1answer
124 views

What Magit command allows re-editing the todo list, during a rebase?

Magit's magit-interactive-rebase function handles the Git interactive rebase very well. But there's one action it seems to be missing. According to git-rebase(1), the four actions during interactive ...
3
votes
1answer
489 views

Vim/Evil keybindings in Magit 2.1

I love vim keybindings. For older versions of Magit, I used this to allow j/k scrolling: (define-key magit-status-mode-map (kbd "k") #'previous-line) (define-key magit-status-mode-map (kbd "K") #'...
3
votes
1answer
64 views

Is there a way to see a pull-request review status in magit?

I see I can view the github pull requests assigned to me with forge-list-requested-reviews. Is there a way to see the status of each review? For example I've approved some of the pull requests that ...
3
votes
1answer
155 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 ...
3
votes
1answer
96 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 ...
3
votes
1answer
79 views

Magit hunk with long lines set default hidden

When I am using magit and open a a certain commit containing hunks with very long lines (a minified javascript file, css ...), emacs does not respond anymore or it becomes very slowly, luckily still ...
3
votes
1answer
326 views

Does magit when using ediff have a means for moving on the next file when there are multiple files to be diffed?

I am using ediff to get side by side diffs with magit and there seems to be no way to move to the next pair of files, after diffing the current file. For instance if I use vimdiff for git diff, after ...
3
votes
1answer
327 views

Magit diff working file to commit in log?

How does one ediff a current file--ie working tree--against an arbitrary version in some previous commit? In this case, I'm interested in pulling in some, but not all, changes from a commit in ...
3
votes
1answer
249 views

How to improve autoloading of Magit's git-commit-mode and other minor modes

Aim I would like to arrange for Magit's minor mode git-commit-mode to be enabled whenever a relevant Git file (e.g. COMMIT_EDITMSG) is visited, from both within Emacs (e.g. magit-commit) and without (...
3
votes
1answer
153 views

What is the correct way to launch a long-running shell command from magit?

In response to a question about extending magit's push menu, I have successfully added a command that logs into a remote server, pulls from where I am, and runs make: (defun magit-update-course-repo (...
3
votes
2answers
104 views

Show recently used branches

In git I run this command to show recently used branches: git for-each-ref --sort=-committerdate --count=10 refs/heads How do I do this in magit?
3
votes
2answers
777 views

Git commit uses fundamental mode after magit update

I recently updated magit to 20151025.1115, which gave me a message about git-commit-mode incompatibility. I now, instead, have a package git-commit at version 20151022.933 (from the magit project) ...
3
votes
1answer
135 views

How can I rename a tag in Magit?

Magit allows renaming various Git references. I can't see how to rename a tag with Magit commands.
3
votes
1answer
402 views

How to set up Magit Forge with Gitlab?

Reading through Magits documentation there seems to be full support for github through Ghub. I am having trouble replicating the set up for gitlab, it is a supported forge but does not have Ghub ...
3
votes
1answer
69 views

How to execute a function in all files in the git working tree?

How to invoke a function on all files in the git working tree, while opening the ones which have had no opened buffers beforehand? A potential use case: Check and fix spelling in all project files ...
3
votes
2answers
344 views

Magit: Can't do any command on Emacs

Windows 10, Emacs 25.1, Magit. I get this kind of message: And I can't do any command on Emacs. Always show this message. Or for those who have difficulties reading such tiny text: Error in post-...
3
votes
1answer
440 views

How to control which window is opened as “other Window”?

I am new to Magit and Spacemacs. I do not understand descriptions of other-window and next-window in the manual. I have 4 windows open in a Spacemacs frame like this: +--+--+ | | | +--+--+ | | | ...
3
votes
1answer
107 views

Running diff in Magit, filtered to only some specific files

I’m basically trying to run this command, but in Magit: git diff master..17 -- "**/*.scala" … i.e. to view changes in all *.scala files between ref/heads/master and ref/heads/17. I’ve tried setting ...
3
votes
1answer
99 views

In Magit log buffer, is there key bindings for traversing in a branch?

In a log buffer with multiple branches (using the lL command, with any =o option), a commit and its immediate parent or child may be shown far apart on the view and is difficult to trace back and ...
3
votes
1answer
207 views

highlight-chars and magit is conflicting

first time StackExchange user here. I'm having trouble with highlight-chars (probably font-lock) and magit. Enabling hc-toggle-highlight-* functions will remove the coloring from magit buffers. ...
3
votes
1answer
671 views

Seeing “Unpushed commits” after doing a push on the current commit

I understand that Magit will report a commit as "Unpushed" immediately after pushing it because it has not been pushed to the Upstream branch (master in this case). That makes me wonder what the ...
3
votes
1answer
974 views

Magit show git hook output

I'd like to configure magit so that when I decide to commit my changes I'm shown not only the buffer to edit commit message and the diff of changes but also the magit-process buffer. Is there a way of ...
3
votes
1answer
553 views

Magit: magit-merge-squash

When I was researching the best way to merge a feature branch with a lot of WIP commits I came across squashing and rebasing however when looking how to do this in magit I found this sentence in the ...
3
votes
0answers
86 views

How do I get magit to run: git push origin HEAD:refs/for/master ? (gerrit) [duplicate]

Gerrit has a magical reference (refs/for/master) that when you push to submits your commit to the code review system. I haven't been able to figure out how to get magit to push to this. I'm not sure ...
2
votes
2answers
303 views

Pushing with P P does not work for me

Reading the Magit user manual, there is an entry on pushing the current branch to its upstream branch, by pressing P P. This is not working for me, as I get P isn't bound to any action on the second P ...
2
votes
2answers
486 views

How to make magit use --force-with-lease as default when pushing?

As per Magit's visual walkthrough, it is possible to save some configs as defaults, e.g: for diffing (section "Changing diff arguments"). I went through the documentation, but did not find anything ...
2
votes
4answers
1k views

In Magit: fatal: Could not read from remote repository

For some repositories at work I get the following message when I try to push my commits: GitError! Could not read from remote repository. [Type `$' for details] The details read: 128 C:/Program ...
2
votes
3answers
658 views

how to supply universal-argument (C-u) to a function call inside a binding statement [duplicate]

I have this on my init.el ;; magit status (define-key evil-motion-state-map "gs" 'magit-status) But I would like to have another binding, for C-u M-x magit-status (C-u is the universal-argument) ...
2
votes
2answers
1k views

Disable evil-mode in magit

I am newbie here, need some help. After upgrade magit to v2.1.0 this morning, i found some short keys are different from the early version. What bothers me is this: when I use some short key(for ...
2
votes
2answers
239 views

Automatically run ispell on magit COMMIT_MSG buffer

I make lots of spelling errors when constructing my commit message. It would be cool if I could add a hook to magit such that when I execute C-c C-c, it would run ispell before completing the commit ...
2
votes
2answers
929 views

magit with modeline status dot

I am using magit (2.2.2) with emacs 25. magit is very good BUT I want the status dot in the modeline (like psvn does). I try to use https://github.com/tsgates/git-emacs/blob/master/git-modeline.el ...
2
votes
1answer
500 views

magit blame: how to go to the commit my cursor is currently on

I want to checkout the file as it was when before the commit was applied so I can dig deeper. Now I just resort to command line git to do that.
2
votes
1answer
339 views

How to execute emacs commands in background

When executing some time consuming commands like magit-status or using scp to transfer files, then Emacs freezes and waits for return. Is there any way I can tell Emacs to run those commands in the ...
2
votes
1answer
631 views

Remove key binding in magit-status-mode

I have C-RET set to other-window globally. For modes that would override this I manually add a hook to the mode's key map, e.g. (add-hook 'magit-log-mode-hook (lambda () (local-unset-key (kbd "<C-...
2
votes
1answer
727 views

How to commit a single staged file in magit?

When I type c-c (type c twice) in staged files, it will commit all the staged files, however i only want to commit a single file of the staged files. How to do it? Thx.
2
votes
1answer
220 views

Why isn't magit-version available?

I have Git 2.5.3 installed and am using GNU Emacs 24.4.1 on Ubuntu. I just installed Magit from MELPA: (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (...
2
votes
1answer
969 views

How do I clean up my local commits and rebase to upstream master in magit?

I have forked the interleave package. I made certain commits in my fork but now I want to discard them. I added the remote upstream branch (master branch by the interleave author), fetched it and ...
2
votes
2answers
740 views

How do I prevent magit from asking to set upstream while pushing?

When I want to push to a different upstream than origin, I use P C-u C-u P so I can set the upstream of the command, however magit always prompts me with question to set upstream also. How do I ...
2
votes
1answer
66 views

Magit deprecates `magit-popup`. Which of my packages depend on it?

How do I get Emacs to report which packages in my running Emacs depend on magit-popup? Soon Magit will stop supporting magit-popup because it has transitioned to the replacement transient. Somehow ...
2
votes
1answer
2k views

Error (use-package): Cannot load magit

I am not sure if that is a problem on my site or more people are experiencing this. I thought at first that I broke something in my config file, but after loading by backup .emacs.d, the error is the ...
2
votes
2answers
96 views

magit: The work for five tasks are mixed in my working directory

So during a hectic coding session, I forgot to do git commit as I did baby steps. Now I have fifty changes in my working directory. And these changes are related to five separate tasks. So I would ...
2
votes
1answer
414 views

packages that improve the magit history graph when running in graphical modes

Are there any modes that improve how the history graph is drawn? it would be nice to find something that: coloured the lines to visually distinguish them used unicode or other graphical fancyness to ...
2
votes
1answer
87 views

Proper way to provide a default optional parameter

I like doing PR reviews with Magit's diff, thus calling magit-diff-visit-file pretty often, providing a universal argument for the optional other-window parameter. To optimize the process instead of ...

1
3 4
5
6 7
12