Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
0
votes
1answer
61 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
83 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
329 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
178 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
152 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 ...
0
votes
1answer
120 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
104 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
209 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
131 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
214 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
493 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
151 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
628 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
804 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
177 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
96 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
138 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
346 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
219 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
357 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
126 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
111 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
972 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
264 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
113 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
342 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 ...
1
vote
2answers
308 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
280 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!
0
votes
2answers
2k views

How to get Exec-path-from-shell working in Spacemacs

I'm using the latest version of emacs, with and without a custom MacOS build (homebrew-emacs-plus). So, I'm trying to use spacemacs on MacOS, and I can't get it to pick up the $PATH on my host system. ...
1
vote
1answer
45 views

I get a warning loading magit sometimes

In magit-repolist-mode: magit-repos.el:151:9:Warning: assignment to free variable ‘x-stretch-cursor’ In magit-submodule-list-mode: magit-submodule.el:332:9:Warning: assignment to free variable ‘x-...
0
votes
2answers
507 views

How to create a new patch set in gerrit

I'm using magit and magit-gerrit, for easy changes, and reviews it works well, but I cannot figure out how to add a new patchset to a change that it is in gerrit
1
vote
2answers
115 views

magit to honour file-local tab-width variable

Some of Python files I work on have the following file-local variables: # Local Variables: # mode: python # python-indent-offset: 4 # tab-width: 4 # indent-tabs-mode: t # coding: utf-8 # End: When ...
1
vote
1answer
953 views

magit “empty ident name (for <(null)>) not allowed” on commit

On Windows 10, after staging a file in magit and attempting to commit it I get this error message instead empty ident name (for <(null)>) not allowed
1
vote
1answer
161 views

Magit refs buffer no longer able to switch branches

After last update, the *magit-refs buffer no longer switches to the branch under point when pressing RET, instead, it shows last commit from the branch I wanted to check out (completely useless ...
0
votes
1answer
240 views

pull failed from magit, but pull works on command line (windows 10)

When pull from magit on windows 10 (spacemacs), the error is: 1 C:/Program Files/Git/mingw64/libexec/git-core/git … pull origin fatal: Could not read from remote repository. Please make sure you ...
4
votes
2answers
369 views

How to follow commit hashes in commit messages?

Some commit messages contain sha1 hashes of older commits in order to reference these commits, e.g.: Fixes: deadbeef Is it possible to visit the referenced commit from the first commit message?
2
votes
1answer
782 views

magit: commit without whitespace-only changes

Is there a way to commit only the lines with non-white-space changes? I have (add-hook 'before-save-hook 'delete-trailing-whitespace) in my .init.el and this usually helps me avoid committing ...
5
votes
1answer
164 views

How to hide the username in magit-log?

Trying to utilize a small screen, and I did this once before, so I know it's possible. How to hide the username in magit-log so that only the commit message is visible?
2
votes
1answer
96 views

Does git-messenger support showing a commit using Magit?

In this issue in git-messenger's issue tracker it was suggested that it should optionally use magit-commit-mode to show commits in a separate buffer. And that issue was closed as resolved. But it ...
0
votes
2answers
101 views

Warning assigning variables

I'm rebuilding my emacs configuration, and trying to compile without warnings. I'm using also cask. I have this case: (require 'magit) ;; Enable a right limit of 70 chars for git logs (add-hook '...
1
vote
1answer
201 views

Can I edit a commit message in Magit before the commit is started?

I tend to write the commit message as I go along and stage changes. At the moment I use a scratch buffer for this, but it would be nicer if I could edit it in Magit from the start. Is this possible ...
2
votes
2answers
108 views

VM causing magit not to work

I have this error when I start emacs: File error: Searching for program, no such file or directory, git My Git is inside the VM in /usr/bin/git How can I point emacs to it? I'm using tramp and ...
1
vote
1answer
217 views

Rebase --onto with Magit

Is there a way to do the following rebase in Magit? git rebase --onto master next topic Thank you
2
votes
1answer
99 views

Does magit support interactive git hook?

My git hook would prompt for answer yes/no when do the push. How could I get the prompt and enter my input when using Magit?
2
votes
1answer
389 views

Magit - How to update a branch without using checkout?

While working on a project, it is necessary to pull some branches from remote and merge into current branch. To update another branch, we have to Stash local changes on current branch Checkout to ...
2
votes
0answers
317 views

How to show word diffs in Magit? [duplicate]

Some people put one sentence or even one paragraph on one line. When someone fixes a spelling error in such a line it is difficult to spot the change in Magit log. How can I toggle Magit log to show ...