Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [magit]

is an Emacs extension for the Git version control system.

1
vote
1answer
267 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.
1
vote
1answer
40 views

How to view unnamed branch in magit “log”?

We recently switched from CVS to GIT, performing the conversion with cvs2git. I use magit, but I cannot find the combination of settings required to see all tags in the log view. The closest that I ...
2
votes
1answer
67 views

How do I change the Magit section heading background color?

I'm trying to customize the look and feel of my Magit setup. How do I change the background color of the section heading below? In particular, I'd like to change the black background color next to ...
4
votes
1answer
241 views

Magit show status on selected directory

I have a git repo and I have changes in different directories. user@box:~/myrepo$ git st On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git ...
2
votes
1answer
235 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: +--+--+ | | | +--+--+ | | | ...
0
votes
2answers
67 views

Magit: Is it possible to show 2 states of file? Before change and after change

Windows 10, Emacs 25.1. , Magit I have xml file. And I remove 8 lines and add 2 lines. Here result in SmartGit: As you can see it's very simple to understand the state of file: before change and ...
0
votes
1answer
61 views

Show different text indent and new text

Windows 10, Emacs 25.1, Magit I change my simple.xml I create 2 indents of text (by space key) and add 3 new lines. Here it's look like in SmartGit: It's look very nice. I immediately understand ...
1
vote
1answer
202 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 ...
0
votes
1answer
71 views

View the log of the staged files while editing a git commit message

When I'm editing a Git commit message, I sometimes like to browse recent commits to the same file(s). That is, I'd like to view the output of git log $list_of_files_with_staged_changes. Git commit ...
0
votes
1answer
281 views

Unable to commit: There was a problem with the editor 'emacsclient -t' (dumb terminal)

I get the following error when trying to amend a commit (same if I try to make a new commit): 1 git … commit --amend *ERROR*: Terminal type "dumb" is not powerful enough to run Emacs error: There ...
1
vote
1answer
127 views

Magit: Current repository?

Windows 10, Emacs 25.1 , Magit I have many git repositories. Does the notion of the currently selected repository exist in Magit?
1
vote
2answers
195 views

How to use magit-commit-arguments to set commit author

I'm trying to use a .dir_locals.el file to override the author field in Git commits (so when I'm committing something in a work repo, I use my work email). It looks like magit-commit-arguments is ...
2
votes
1answer
92 views

Magit: Autoscan for repositories

Windows 10, Emacs 25.1, Magit If I want to add exist git repo to Magit I add it in variable magit-repository-directories OK. But if I have about 20 git repo? I wan't add it manutaly to Magit. Is it ...
0
votes
1answer
46 views

Magit: Not visible selected region

Windows 10, Emacs 25.1, Magit. If I want to select some regin in scratch buffer I use Shift arrow (or by mouse). It's work fine. Here example: Now I want to select text in Magit: android:...
7
votes
3answers
378 views

Magit: Copy text from Stage section without character “+”

Windows 10, Emacs 25.1, Magit I select some text (Shift + Arrow Down) from the Unstaged changes section. Here is a screenshot: Then I paste into another buffer (*scratch*). This is the result: Is ...
1
vote
1answer
304 views

Magit fail git pre-commit hook with No such file or directory

I have a git pre-commit hook to run the unittest locally on my GNU/Linux manchine. The content of my pre-commit file is #!/bin/bash source activate project && python manage.py test &&...
4
votes
1answer
325 views

Magit: Auto-refresh “magit-status”

Windows 10, Emacs 25.1, Magit I want auto refresh buffer "magit-status" when was some change on files in my project. So I set variable magit-refresh-status-buffer to on non nil. But it not help.
0
votes
1answer
38 views

How should I go about adding actionability to common interface elements (like commits)?

I was on the fence about raising this on GitHub, but it's not necessarily a feature request and it certainly isn't a bug report. I'd like to add some actionability to every reference to commits ...
2
votes
1answer
190 views

Magit: Is it possible to edit text directly in “Unstaged changes”?

Windows 10, Emacs 25.1, Magit Execute command magit-status and press "TAB". Here result: If I want to change this text I go to my editor (e.g. Notepad++) and edit text. The question is: Can I ...
1
vote
1answer
120 views

magit-stage-modified doesn't stage untracked files

When I want to stage one file I use the command magit-stage. It works. But now I want to stage many files at once, using the command magit-stage-modified. Here's a sceenshot: But after I press y ...
3
votes
0answers
58 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 ...
0
votes
0answers
30 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
398 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
56 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
575 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
137 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
357 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
80 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
175 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
78 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
186 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
78 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
292 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
149 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
82 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
4k 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
604 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. ...
10
votes
1answer
3k 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
127 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
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
75 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
317 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
173 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
146 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
115 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
102 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
192 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
122 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
204 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 (...