Stack Exchange Network

Stack Exchange network consists of 174 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
112 views

Magit: stash push

The stash "push" command is really practical, while stash "save" is supposed to be deprecated. However, on magit I can just find stash save... Is there any reason for that? Did I miss something? ...
3
votes
2answers
79 views

Could magit be writing `.git/index` without my intervention?

I'm trying to track down an issue which might be caused by magit. I work on multiple machines, and on each machine I have an emacs running, each of which has some magit buffers open. I keep machines ...
0
votes
1answer
64 views

changes in commits are not shown any more

when commiting in magit it used to open a diff window where I could see the changes I'm commiting right now. For some reason this window doesn't open any more on some repos. I must have disabled this ...
0
votes
1answer
47 views

Magit status wired output on RHEL 7

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
1answer
112 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 ...
1
vote
1answer
64 views

make magit check uncommited changes when opening a file

Sometimes I am interrupted while coding and forget to commit. I would like to be warned about this next time I open a file with uncommited changes. I tried (defun my/magit-check-file-and-popup (file)...
0
votes
1answer
151 views

How to move master to branch in magit?

This is how I move master to branchX in git: $ git checkout master #move HEAD to master $ git branch -f branchX HEAD #move by force, HEAD to branchX Is there a way to do that in Magit?...
0
votes
1answer
95 views

How to view remote URLs on magit?

I would like to make sure I know where I am fetching, pulling, and pushing to. How to view remote URLs in magit? From the magit manual "7.1.1 The Remote Popup" on https://magit.vc/manual/magit/The-...
0
votes
2answers
537 views

How to setup upstream remote using Magit?

I am reading through the magit manual trying to figure out how to configure remote variables. From the magit manual "7.1.1 The Remote Popup" on https://magit.vc/manual/magit/The-Remote-Popup.html : ...
5
votes
2answers
217 views

Merge specific files with magit

Is there a way to merge single files in magit like you would do from this question or something equivalent. Namely: $ git checkout source_branch -- <paths>...
0
votes
1answer
108 views

Magit - Always show expanded sections by default

Sometimes (seemingly randomly) the sections such as "Recent commits", will be closed by default. Can I set it so they are all always open by default?
2
votes
1answer
149 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 ...
1
vote
1answer
893 views

How can I do a git diff on the current file?

I'd like to do a diff on the current file / buffer compared to the git repository. Ideally a single function that could be called, or binded to a keyboard shortcut.
5
votes
1answer
140 views

Use `git add -N` in magit

Wondering if it's possible to indicate intent to add a file via magit. The intension would be to stage parts of an untracked file for a commit but leave the rest rather than the default git add ...
1
vote
1answer
99 views

Magit diff with --name-only?

I am browsing the differences between two branches of a repository via git diff --name-only branch1 branch2 I also use the --name-status option sometimes, since I may need to see what sort of ...
1
vote
1answer
40 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 ...
0
votes
1answer
170 views

Overriding a magit Keybinding using evil-mode and bind-map

I am using evil-mode, magit, evil-magit, and bind-map. I have defined a map with bind-map using SPC as my :evil-keys similarly to what spacemacs provides. Magit defines SPC as magit-diff-show-or-...
1
vote
2answers
179 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-...
0
votes
2answers
466 views

magit: GitError! Could not read from remote repository. [Type `$' for details]

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
2answers
96 views

corrupted magit

Last week I had to abort a rebase in magit. Soon after my computer became unstable so I rebooted. Today, when I do C-x g for magit-status, I get an error in the status line Setting current ...
1
vote
2answers
73 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 ...
0
votes
1answer
110 views

How do I apply a patch from gnus to a git repo?

I've got an email with a dozen .patch files attached in gnus. I can save them to e.g. ~/Downloads and then apply them with magit-patch-apply-popup, but considering that I've got gnus open on the left (...
0
votes
1answer
97 views

What are the requirements to stage a hunk from any Magit diff buffer?

I cannot stage a hunk with magit-stage in any *magit-diff buffer except the *magit-diff buffer created via status buffer. Magit says "user-error: Cannot stage committed changes". I mean, I cannot ...
0
votes
1answer
77 views

Is there a Magit hook for post checkout?

Unfortunately, the vc-mode in my mode-line is not being updated when checking out a branch, it still points to the older branch. revert all open buffers fixes than but I can't find a hook to attach ...
0
votes
2answers
125 views

Magit reuse same window for different project when switching window

I'm a new user of magit and I'm currently using it in a separate frame with a single window (magit-status). I'd like that to show the git status of the project of the latest visited buffer. Imagine ...
1
vote
1answer
191 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
36 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
51 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 ...
3
votes
1answer
173 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
173 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
56 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
54 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
135 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
62 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
206 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 ...
0
votes
1answer
99 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
148 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 ...
3
votes
1answer
88 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
40 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
286 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
232 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
211 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
36 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
155 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
93 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
39 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
29 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
295 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
52 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
436 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 ...