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
32 views

Magit: Can offer cursor commit? [duplicate]

Here my git log: As you can see on top window the cursor is over commit "settings". And when I enter command: magit-reset-soft I wait that Magit will offer me the next candidate: Soft reset to : ...
0
votes
1answer
517 views

Magit: How reset-soft to specific commit?

List of my branches: develop features/magi master Current branch is features/magi. I want to reset from current commit (commit 3) to previous commit (commit 1). So I use command: magit-reset-soft ...
0
votes
1answer
57 views

When editing remotely, after I change the working tree with magit, why won't my buffers autorevert?

I have magit autorevert set (and also global autorevert), and it seems to work OK editing local files but not using tramp over ssh. If I do, say, a hard reset in magit, my buffers aren't autoreverted,...
0
votes
3answers
721 views

How to kill magit-diff's buffers on quit?

After making a commit in magit, magit will leave around a magit-diff buffer containing just: Staged changes (empty) [back] This is pretty useless and clutters up my buffers, and I'd just like that ...
0
votes
1answer
163 views

Magit: Files missing in status buffer when “Ignore all whitespace” is enabled

In Magit I sometimes toggle Ignore all whitespace in the status buffer. This causes files that contain only whitespace changes to disappear. This means I cannot operate on them without toggling Ignore ...
2
votes
2answers
456 views

Magit sets auto-revert mode — annoying!

I've recently upgraded to Magit 2.10.3 and Emacs 25.2.1. My full config is: Magit 2.10.3, Git 2.13.5 (Apple Git-94), Emacs 25.2.1, darwin. I was previously on Magit 2.3.1 and Emacs 24.4.1. Now, ...
3
votes
1answer
89 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
202 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 ...
2
votes
1answer
82 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
vote
2answers
202 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 ...
1
vote
1answer
88 views

How can I expand git URL to its canonical form in magit?

In magit, if I call git-link in a buffer that is visiting a file being version controlled, I get a github link. Is there a way to get the canonical form of that link directly from emacs, without ...
1
vote
2answers
334 views

magit with tramp is not working with git correctly

I installed magit. I added the following lines to my .emacs: (require 'tramp) (push "/path/to/git/directory/" tramp-remote-path) And when I am in tramp I run M-x magit-version here is the output: ...
1
vote
1answer
176 views

How to revert buffer after magit-checkout?

I use smart-mode-line package and I noticed when I change/checkout branches in command line, or in Magit, this is not reflected in the Smart Mode Line. I still see the name of the old branch, while I ...
0
votes
1answer
92 views

Magit: Prevent commit message from being pre-populated with a bullet point and file name

Right now an example git commit message looks like below. It has the filename listed * emacs.d/robenkleene/config/robenkleene-config.el:. How do I not have the commit message pre-populated with that ...
11
votes
2answers
5k views

Magit - How can I checkout a remote branch locally without typing the entire branch name?

I have a remote branch remote-branch-long-name. When I magit checkout with helm completion I can type remote-branch and origin/remote-branch-long-name will show up as an option. The issue is that to ...
2
votes
2answers
713 views

magit with tramp is slow

Here is my environment: project A is on the server. My PC connects to the server by 1 Gbit ethernet. Ping latency between PC and server are about 0.3 ms. project A's source code size is about 75 MB. ...
11
votes
1answer
4k views

Magit - Undo last commit - History Manipulation

This StackOverflow question has the best solutions/approaches to undo last commits. I started using Magit a couple a weeks ago and after looking through all its documentation I still don't have a ...
0
votes
1answer
141 views

Magit fetch all repos from GitHub

I have just installed Magit and so far all is going great! However, I have a lot of GitHub repos that I would like to fetch via Magit. Is there a way to fetch all repos from GitHub?
0
votes
1answer
63 views

magit + ido: do not offer tags in completing read?

Q: how can I get magit + ido to ignore tags when checking out a branch? I'm using magit + ido. When I go to check out a branch, ido helpfully gives me the names of all existing branches, but it also ...
0
votes
1answer
85 views

magit: how to display more visible (desktop) notifications ? (How to get the return code ?)

update: WIP here: https://gitlab.com/emacs-stuff/magit-notify working but lacks configuration. I'd like more visible magit notifications: often I want to push some commits but there is an error (a ...
-3
votes
2answers
339 views

What is the meaning of “Push” in Magit status buffer? [closed]

In a way completely detached from those commands in Git, Magit displays this: Head: heroku-master Added curl-based test, GPG and bulk inserts Merge: heroku/master Added curl-based test, GPG ...
1
vote
1answer
181 views

Spacemacs+magit+helm checkout hide branches

Due to my workflow I have a lot of branches that I don't want to see in the magit helm checkout window. Is there a way to hide some branches here, preferably with a regexp?
0
votes
1answer
170 views

How to view magit's current repository?

According to the Magit manual the combination C-x g (magit-status) shows the status of the current Git repository in a buffer. How can I view what the current Git repository is, i.e. the full path ...
1
vote
1answer
134 views

Insert and expand snippet when committing with Magit

I use a template with Git for keeping my commits messages neat and professional, as explained here. However, since I use Magit, I would like to insert and expand a snippet with Yasnippets because ...
1
vote
1answer
113 views

Smerge and nested diffs

After screwing around with Magit rebasing, I ended up with a commit that includes a bunch of diff markers in a file[1]: <<<<<<< HEAD ======= foo <<<<<<< ...
1
vote
1answer
232 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 ...
1
vote
1answer
143 views

Magit: finding tags after commit

I often find myself in the following situation: Look at some code in a project (e.g. string-trim in subr-x.el in Emacs) magit-blame to see which commit added that code Wonder which tags of the ...
2
votes
1answer
1k views

How to use magit-list-repositories?

I have set magit-repositories-directorylike this (setq magit-repository-directories `("~/go/src/github.com/cescoferraro", user-emacs-directory)) Then I can M-x magit-list-repositories RET and I ...
3
votes
1answer
220 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 (...
1
vote
1answer
530 views

view git diff version by version

I'd like to browse the history of a specific file version by version. Ideally, as I step through history I should compare it with the closest previous version.
1
vote
1answer
170 views

Magit function to push

Specially when editing my init.org file, I usually want to push every single change to origin. So I want to write a function to do this, I am almost there but still need some help. (defun cesco/...
2
votes
2answers
691 views

Turn on auto-fill-mode when editing a commit message with Magit?

I have tried: (add-hook 'git-commit-mode-hook '(lambda () (setq fill-column 72) (turn-on-auto-fill))) In both cases, auto-fill-...
0
votes
2answers
876 views

Magit commit error: “cannot spawn sh” + “cannot start editor”

When I try to commit using Magit, I get the following error message: 1 c:/Users/chanyoungs/AppData/Local/GitHub/PortableGit_f02737a78695063deace08e96d5042710d3e32db/cmd/git.exe … "commit" "--" ...
0
votes
1answer
186 views

Can't commit on Windows using magit

I keep getting the following error 1 c:/Program Files (x86)/Git/bin/git.exe … "commit" "--amend" *ERROR*: Wrong type argument: stringp, nilerror: There was a problem with the editor '"c:/...
1
vote
1answer
99 views

Unexpected: magit stash performs git reset --hard, why?

I used magit to store current workspace content to git using z z, which I expected to store my work in a stash. However, process log showed that magit simply did git reset --hard HEAD and created an ...
0
votes
1answer
38 views

Magit-process shows every frame of dynamic “animated” output

I'm working with a project that has a pre-commit hook that outputs an "animated" progress bar and updates the output to show which step is completed. In the magit-process buffer it shows every frame ...
6
votes
1answer
147 views

Can I show another commit in a second magit-revision buffer?

Is there a way to have magit show two commits in two different buffers? I want to visually look at two commits at the same time. Using magit-show-commit opens a magit-revision buffer. Doing another ...
1
vote
1answer
404 views

Not inside a git repository [duplicate]

magit-version: Magit 20170407.2107, Git (unknown), Emacs 25.1.1, darwin git version 2.12.2 OS x 10.12.4 git status on command line works fine git rev-parse --git-dir gives .git magit-status asks for ...
1
vote
1answer
235 views

Magit version post-installation does not look as in the manual

I have just installed Magit from Melpa as per the instructions in the official Magit manual. I then proceeded to follow the manual's Post-Installation Tasks section, which states After installing ...
1
vote
2answers
1k views

How to set up Magit to access a GitHub repository?

How can I set up Magit to access a GitHub repository?
0
votes
1answer
385 views

Run magit command in other-window/frame?

Is there a way to run magit commands so that the the command is run within a new window or a different frame? For example, when running magit-log-all-branches (l b) from the magit-status window it ...
3
votes
1answer
141 views

How can I navigate up/down a log from magit-rev-mode?

When I'm reviewing a patch series in magit I want to be able to look in detail at each patch in a tree. However there doesn't seem to be an easy way to navigate to the next/previous commit from inside ...
0
votes
1answer
113 views

Magit + Emacs + Windows: 7 alert dialogs on first use?

Background The first time I run magit-status after starting Emacs, I get a series of 7 alert dialogs popping up. Each one just says "emacsclient 25.1" and has an OK button. They don't seem to do ...
13
votes
1answer
1k views

magit blame: is there an equivalent for “show me the file before this commit” from VC?

VC blame mode has a nifty a hotkey "show me blame of the file before the commit I'm pointing at". Is there an equivalent in magit?
1
vote
2answers
272 views

Using ido completion for selecting a repository for magit

I like to use ido for completing file paths and helm for all other things. I have tried setting magit-completing-read-function to magit-ido-completing-read. This doesn't change magit-status behaviour ...
3
votes
2answers
2k views

Magit how to use ssh key rather than being prompted for password

I've seen the question here but I'm not sure if the same solution would apply to me https://emacs.stackexchange.com/questions /17866/magit-how-to-use-systems-ssh-agent-and-dont-ask-for-password/17890#...
1
vote
1answer
114 views

Write function that runs a command only after a previous command finishes

I would like to create a function that runs a command only after a previous command that takes some input from the user finishes running. In particular, I would like to write a function that runs a ...
3
votes
1answer
356 views

Can magit show if a branch is ahead or behind?

Git hosting web services like Bitbucket Server and GitHub provide a branch view that shows whether branches are ahead or behind master: This is great for finding remote branches which have been ...
2
votes
2answers
352 views

use nonstandard `.git` directory with magit

I have been using the setup described on the top comment here to manage my dotfiles using git. In short, I have this in my .bashrc: alias config='/usr/bin/env git --git-dir=$HOME/.myconf/ --work-...
2
votes
2answers
302 views

Add (copy) to kill ring current branch name with Magit

Is there a way to easily copy the current branch name in Magit via M-x? At the moment I open the status pop up magit-status and copy the name from there. Best & thanks for your help!