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.

2
votes
2answers
191 views

How can I open magit-status in a new frame?

How can I open magit-status in a new frame? I've tried to write a custom function for this but it has some issues as described below. (spacemacs/set-leader-keys "gs" (lambda () (interactive) ...
0
votes
1answer
62 views

Create and checkout to new branch by one command

If I need to create new branch and checkout to it I use two commands: 1.magit-branch 2.magit-branch-checkout Is it possible by one command to create AND checkout to new branch?
0
votes
1answer
33 views

How do I get better indication that my git configuration is wrong?

I ran magit-status, and was surprised by the absence of changes. It turned out that I'd misconfigured my git textconv settings, so 'git diff' was returning an error. However, I saw no indication of ...
1
vote
1answer
126 views

How do I visit a file on a different branch?

I'm aware of C-x v ~ which allows you to see a different revision of the current file, but I would like to visit the file on another branch. Is this possible with magit, VC or git-timemachine?
1
vote
1answer
100 views

Search through logs by author/comitter name in magit log buffer

Once I enter into the logs for a repo from the status buffer (using ll) how do I search through the log buffer by username? Just using regular isearch doesn't seem to pick up the author names in the ...
0
votes
1answer
88 views

how make “magit log” show entire log message

I have a commit with a message like this: Contact Inquiries todo: current user detection import old table actionmailer + mailgun Magit log only shows "Contact Inquiries", and not the other 4 lines. ...
0
votes
1answer
85 views

Jump to next merge conflict in project using Magit and Smerge

When I am resolving merge conflicts with Magit and Smerge, is there a way for me to cycle through all merge conflicts in the project? Currently I can only move through them one file at a time. I ...
2
votes
1answer
36 views

Is it possible to disable magit calling :git branch --remote --contains <foo> when doing an interactive re-base?

I'm running on fairly large repository (Gentoo's portage, 2.5G .git) and slightly slow hardware (1Ghz arm64) and interactive re-basing is very slow. It seems the main culprit is "git branch --remote --...
0
votes
1answer
72 views

make-magit-popup-event: Symbol’s function definition is void: record [SOLVED]

I get the above message using the latest magit from melpa. This occurs with GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-12-20 on Ubuntu 16.04. Any ideas?
0
votes
1answer
61 views

Signing merge commit with magit

I know how to sign standard commits using magit, but I'm not able to sign the commits generated by merges. Is there any way to do that?
2
votes
1answer
41 views

How can I log the commands magit uses for values?

I'm bringing up a new machine and some operations are very slow. I'd like to re-run the commands magit is sending in a normal shell so I can use perf to see where time is being spent. magit-git-debug ...
0
votes
2answers
99 views

commit by saving and then killing the COMMIT_EDITMSG buffer in magit?

I understand that in magit the normal way to commit after editing the commit message buffer would be C-c C-c However in using git from the command line --- with Emacs as the editor for commit ...
1
vote
1answer
107 views

How to save remote repo credentials

Linux Mint Emacs 25.1 Remote repo URL origin (h t t p://git.remotehostname.git) In application SmartGit when I pull/push data from remote repo, it's prompt credentials ONLY ONCE. But when I try ...
1
vote
1answer
104 views

Modify last commit's message and push to upstream

I'm thinking about automating my following git workflow in emacs: checkout to a new branch remove some pattern in the last commit message commit (amend) it push it to upstream How could I automate 4 ...
0
votes
1answer
59 views

Magit error during commit on Windows

I have been getting an error when trying to commit using magit. I stage my change with a, then on commit cc I get the message: Opening output file: No such file or directory, c:/Users/myuname/.emacs....
0
votes
1answer
48 views

Magit: enable `toggle-truncate-line` in diff-mode

I'm working with tex files that have usually long lines of text. I enabled in magit the fine coloration of errors by using: (setq-default magit-diff-refine-hunk 'all) and now I'd like to disable the ...
1
vote
2answers
62 views

Magit shows magit-diff with HEAD^ instead of HEAD when invoked from console

When I start a commit from console (zsh on mac os Terminal) using git commit -a, then Emacs opens two windows as emacsclient in my existing Emacs App Window. One is the correct COMMIT_EDITMSG. The ...
0
votes
1answer
79 views

git-commit-mode with flyspell very slow

I use emacsclient as my git commit editor. This is what I have in my init file: (require 'git-commit) (add-hook 'git-commit-mode-hook 'turn-on-flyspell) I just made a huge commit (update of a third-...
3
votes
1answer
220 views

Magit asks for passphrase for ssh key every time

Running emacs 25.2.2 magit 2.12.1 on Kubuntu 18.04. I have set-up ssh keys for my bitbucket repository and I run ssh-agent on start. When I fetch or pull or push, magit asks for the passphrase for ...
2
votes
1answer
46 views

How to echo each magit command after each action?

Although I can use $ to see the command histories, I'd like to see it immediately each time I performed an action. E.g. Display git push -v origin master\:refs/heads/master after P p.
0
votes
1answer
88 views

Magit - “user” in Branch / Create from Pull Request

I've been using Magit for a long time, but finally read the manual, and started playing in the deep water. Not sure how to fix what I did... I tried b Y (Branch / Create from pull request). It asked ...
0
votes
1answer
51 views

temporary change magit-display-buffer-function

I have create this little helper to easy jump to my last used git projects, I using magit-status-internal to open a status buffer and I set magit-display-buffer-function so that the status is open in ...
0
votes
1answer
38 views

Why is the Magit M Remote pop-up different than what is shown in the Magit manual?

The Magit manual, 7.1.1 The Remote Popup, describes the following three commands, but they do not appear in my 'M' popup: M C (magit-remote-config-popup) M p (magit-remote-prune) M P (magit-...
4
votes
1answer
181 views

Using auth-source with magit and bitbucket

The code base I'm working on has recently moved from ssh key controlled git to https bitbucket. I use Magit to handle my version control in Emacs. In the old ssh world I was never challenged for my ...
3
votes
1answer
40 views

Latest Magit expands hunks after staging

With the latest version of Magit (20180410.432) I feel that the staging behavior has somewhat changed. Before, I used to expand the unstaged files in the Status Buffer, then stage the hunks one by one....
0
votes
2answers
55 views

Stage changes in just the first line of hunk

Consider the following situation: $ printf $'line1-v1\nline2-v1\n' > test.txt $ git init . $ git add test.txt $ git commit -m 'Initial commit' $ printf $'line1-v2\nline2-v2\n' > test.txt Now, ...
0
votes
2answers
59 views

How can I get a prompt for deleting index.lock file in magit?

This is a long standing issue https://github.com/magit/magit/issues/2708 . I feel that a prompt for deleting the transient file would compensate in most cases. Is there a reliable way to achieve this? ...
1
vote
1answer
247 views

Magit - How do I sync my feature branch with the latest master without checking out master?

Here's what I am trying to do:: I have one project in one git repository. I've made some changes in master and created a spinoff branch (b s) called my-feature. Now I've finished my feature and would ...
3
votes
1answer
73 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 ...
1
vote
1answer
53 views

How can I determine if a `git` branch is a remote-tracking branch using Magit?

Is there a function magit-magic such that (magit-magic "master") => t (magit-magic "origin/master") => nil assuming origin/master is a fetched, but possibly unpulled branch on remote origin? (...
1
vote
1answer
262 views

How can I tell magit to ignore specific modified files?

I am working on a project where webpack's bundle.js is part of the repository. This file is gigantic and has many diffs and slows magit down. Is there a way I can tell magit to ignore this file when ...
1
vote
1answer
58 views

magit function to check if a branch is in sync with remote

Is there a function in magit to check if a branch is in sync with with it's remote (basically I want to check if both branches sit on the same commit) At the moment I check if remote branch and the ...
2
votes
1answer
200 views

How can Magit add a credential to ssh-agent?

Can I make Magit add my ssh passphrase to ssh-agent instead ask me to use the passphrase a single time? Every time I push a commit to my remote I need to type my passphrase or instead run M-& ssh-...
2
votes
1answer
235 views

Magit commit is slow even for tiny changes

For the last few months, committing even tiny changes using magit (c c) is really slow to bring up the commit message buffer. I've profiled the code that is executing during that time but I'm not ...
4
votes
1answer
71 views

How can I prevent Magit-status command from grabbing the frame focus?

when executing magit-status and quickly focus out emacs, after the magit buffer pops up, emacs grabs the focus back. This is quite inconvenient. Is there a way to prevent that focus changing? The ...
2
votes
1answer
173 views

Magit: amend the last commit with sign off

What if I forget to sign-off my last commit, how can I fix the last commit within Magit? I can do that with git command: $ git commit --signoff --amend Of cause I can write the sign-off by hand in ...
0
votes
1answer
563 views

Error (use-package): Failed to install magit: Package `magit-' is unavailable

I am starting to build up a .emacs file to be used as a development environment within Docker containers. I get this error when starting emacs-nox in a Docker container. Error (use-package): Failed ...
3
votes
1answer
241 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 ...
0
votes
1answer
54 views

Revert buffer messages in echo area obscure minibuffer

My issue is that when I switch git branches in a project, each file that changes needs its buffer to revert, and this message is spat to the echo area for each file. If I try to run a command from the ...
1
vote
1answer
33 views

magit-define-popup-switch not enabled by default

I'm trying to teach magit that git pull --rebase should always --autostash. pull --rebase is always my default, so I want --autostash to be the default as well. The 5th argument of magit-define-...
0
votes
1answer
29 views

How to execute a function on the name before creating a branch in magit?

I want to execute the following function on the provided name before creating a new branch in magit: (defun pb/magit-new-branch-name (branch-name) "create a name usable as a branch name from branch-...
4
votes
3answers
231 views

Why does magit now prompt for which submodule to update?

I used to be able to press "o" then "u" (magit-submodule-update) in a magit buffer and have it update all my submodules. Now, it asks me to type in the path of which submodule I want to update. Is ...
1
vote
1answer
68 views

Magit stage modified without confirmation

(magit-stage-modified 'all) stages all modified files, but only after confirming it with the user with the message Stage all changes? (y or n). The function is defined as follows: (defun magit-stage-...
5
votes
1answer
192 views

Use magit to compare all changes in two revisions

Is there a way to invoke Ediff from Magit in order to compare the changes to all files between two revisions, not just the changes in a single file? My use case is a coworker will ask me to review ...
5
votes
1answer
72 views

Hide or fold stash section automatically in magit-status

I tend to stash a lot when using git, so my "stash" section in magit-stashes is getting pretty long. I'm not running out of hard-drive space or anything, so I don't want to delete the stashes. Can I ...
3
votes
3answers
129 views

magit-status does not open, when using (global-whitespace-mode 1)

This problem started happening today when I switched to my desktop computer after a couple months of using my laptop. I updated emacs to 25.3.1, updated all my packages, and downloaded my latest ....
0
votes
1answer
144 views

magit-status does not highlight diffs

I'm currently seeing a display problem in Magit. For a while I've seen that when I do magit-status, the diffs are no longer highlighted. I didn't care for a while, thinking it was the theme I've been ...
1
vote
2answers
153 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 ...
0
votes
1answer
110 views

Magit magit-diff-refine-hunk does not work if I don't move the cursor to the good lines

In magit, it looks like that if I want to have a diff that highlight changing words, I can either press D t when I'm in the diff, or put in my .emacs (custom-set-variables '(magit-diff-refine-hunk ...
0
votes
0answers
40 views

Add single file in untracked directory [duplicate]

How do I add an untracked file inside an untracked directory to git with magit? Right now, I have to add the whole directory then go through the files and remove the files I don't want to add. Is ...