Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

How to force Magit to use current Emacs instance to edit commit message?

I use emacs -nw + tmux. Just upgraded Magit from 2.8.0 to 2.90.1, and found it always open a new Emacs GUI window when committing instead of use current Emacs instance directly (the behavior in 2.8.0)....
1
vote
1answer
16 views

Auto-refresh magit status only when magit is running

I've seen the post Magit: Auto-refresh “magit-status”, and tarsius recommends the same method from the Magit manual to set magit-after-save-refresh-status to non-nil to the after-save-hook: (add-hook ...
0
votes
1answer
19 views

Integrate Magit with ssh-ident

Recently I was looking at utilities for handling ssh-agent at an even higher level, so that entering SSH keys passphrases becomes even more seamless than with the standard ssh-agent utility. One such ...
1
vote
1answer
27 views

Magit - problem doing a second commit related to the GIT_EDITMSG buffer

This looks similar (the same?) as How to prevent Magit from saving COMMIT_EDITMSG? but I've also confirmed that the problem isn't magit itself, but interactions with settings or other packages. I'm ...
1
vote
0answers
46 views

How to set up Magit Forge with Gitlab?

Reading through Magits documentation there seems to be full support for github through Ghub. I am having trouble replicating the set up for gitlab, it is a supported forge but does not have Ghub ...
1
vote
1answer
85 views

Emacs Magit not working after OSX Catalina upgrade

Since upgrading my mac to Catalina yesterday, I managed to get Emacs working again after allowing Ruby access to all files in the settings, and most of it works fine, but I can't get Magit to ...
3
votes
1answer
50 views

Magit: Howto create a new commit ignoring white-space differences

I'm using magit 20191128.39 on Emacs 26.3 When changing a python script resulting in a new unstaged change, git/magit should ignore whitespace-differences. A git diff -w will do the trick, but I'd ...
1
vote
0answers
58 views

magit refresh is too slow

We're talking tens of seconds. In comparison, git status in the same repo is nearly instantaneous. Here is my profiling result on refresh: - command-execute ...
2
votes
1answer
48 views

Magit set upstream to origin/master automatically

Is there a way to set the upstream of a branch automatically in magit? I know I can select it interactively but for feature branches I set it to master 99% of the times so I was wondering if it can ...
1
vote
1answer
33 views

Is there a way to add git alias of customized log to magit?

In ~./gitconfig, I have [alias] lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%...
3
votes
1answer
60 views

How to show diffs of merge commits in magit?

When viewing a merge commit it only shows the number of lines changed but no diff. I know that it is possible with git show --first-parent. Is there a way to add an argument to magit-show-commit? I'...
0
votes
1answer
42 views

magit-status open selected buffer change hunk in other window rather then in the same window

I used to have this functionality using code below: (setq magit-display-file-buffer-function (lambda (buffer) (setq current-prefix-arg t) (magit-display-file-buffer-traditional ...
2
votes
1answer
115 views

How can I turn off magit's warning that a commit message has a second line that is non empty?

Every time I have a second line in a commit message, magit prompts/warns me when commiting... Is there a way I can turn this off warning? I've found the following in the docs https://magit.vc/manual/...
0
votes
1answer
100 views

How to let Magit highlight changes

I've been using magit for a couple of weeks now and I really really like it. There is, however, one thing I still can't get to work, which is the highlighting of changes. In the pictures used in the ...
2
votes
1answer
57 views

Browse line range of file in GitHub with Magit

Is it possible to select a range of code and open it in GitHub using Magit? I use the browse-at-remote package for this, but I wonder if this could be done from Magit. I'd like to navigate both from ...
1
vote
1answer
50 views

Unstaged changes not appearing in magit, plus other oddities

I'm a Magit rookie and finding it is not behaving as expected. I have multiple unstaged changes in a repository (see "Git Status" below). However, Magit is not showing them (see "Magit" below) when I ...
0
votes
1answer
24 views

Magit log: move cursor to the HEAD

While in the log buffer, is there a way to move the cursor directly to the HEAD commit?
1
vote
1answer
89 views

Updating magit today gives me invalid face attribute

Updating magit this morning I now can't start things up, getting: face-attribute: Invalid face attribute name: :extend Anyone know what could cause and (hopefully!) fix this?
0
votes
1answer
50 views

Magit pull with merge/rebase from upstream/pushRemote

I have upstream set to the develop branch (say origin/master) and pushRemote to a feature branch. I currently use pulling with preserving rebase. I would like to setup magit in such a way that: ...
0
votes
1answer
22 views

Magit doesn't prompt for SSH key after OS upgrade?

Q: magit no longer prompts me for my ssh key when pushing/pulling; how do I fix it? After an OS upgrade (Lubuntu 19.04 to 19.10), I can no longer push to origin from magit. Pushing to origin results ...
1
vote
0answers
65 views

Extra carriage-return on magit path

I'm having a little trouble with magit and the default-directory variable. When calling M-x magit-status, an exception is thrown - Setting current directory: No such file or directory, /path/to/git/...
2
votes
1answer
25 views

Prevent magit-status from closing hunk preview window when magit-status buffer close

I configured magit-status to open selected buffer change hunk in other window rather then in the same window with: (setq magit-display-file-buffer-function (lambda (buffer) (setq ...
2
votes
1answer
64 views

How to show commit authors in Magit section “Recent commits”?

The "Recent commits" section in the status view shows short commit checksums plus the subject of the commit. How can I also show the author of each commit?
5
votes
1answer
42 views

What is the equivalent of doing a plain `git reset <sha>` in magit?

I sometimes want to undo a commit without losing the changes, but just placing them back into an uncommitted and unstaged state. To do that at the cli, I do just git reset <sha-of-previous-commit&...
1
vote
1answer
27 views

Add a group of options in a Magit transient

I would like to add a group of options to a transient, but I cannot figure out the POS parameter I should use. (transient-append-suffix 'magit-push "-n" ;; after the last option of the first group [...
1
vote
1answer
68 views

Magit merging changes manually

When I do merge preview m p I see a log of other branch changes for each affected file. Changes marked like this: @@ -20,6 + 22,7 @@ - <change> + <change> To merge only a ...
0
votes
1answer
104 views

Magit set upstream origin

I'm having trouble understanding how Magit handles pushing local branches to remote I create and checkout a new branch with b c. I make some arbitrary change, and save returning to magit with C-x g ...
1
vote
1answer
35 views

Magit status Recent commits foreground color

I have a terminal with a dark background color. Magit shows recent commits and uses a dark color for the commit hashes so I can't see them. I tried customizing frame-background-mode to be dark but the ...
2
votes
1answer
94 views

Magit-todos warning: File is too long, consider excluding it from scans

Whenever I do something in Magit buffer I get this warning: Warning (magit-todos): File has lines too long for Emacs to search. Consider excluding it from scans: path/to/file In particular it ...
1
vote
2answers
89 views

Problem Committing with Magit

I'm a relatively new convert to emacs and a very new convert to Mac. After installing Emacs using the ESS installer (Version 18.10.2). When I attempt to state a file for commit I receive the ...
2
votes
1answer
59 views

Cannot get Magit to show the commit signatures in the log

In order to prove that I had a signature on a commit I needed to use a this command line command: $ git log --show-signature -1 I could not get Magit to display the signature I tried to use the ...
0
votes
1answer
95 views

magit commit does not permit adding a gpg signature

I am failing to run gpg to sign commits, after doing so successfully before an upgrade to Mojave and an upgrade to Emacs. (I am not sure when I lost the ability to sign files in the past year.) When ...
4
votes
1answer
74 views

Can magit pull hunks from another commit into my branch?

I have a big commit on another git branch. I'd like to "cherry-pick" some hunks from that commit into my current branch. I bet magit can do that, but I'm not sure how. Anyone? (I've seen ways to ...
0
votes
1answer
46 views

magit-checkout does not update current buffer

When I checkout an existing remote branch, the current buffer remains on the old branch. However if I open a new file, that new file is on the checked-out branch. My current workflow is this: ...
3
votes
1answer
67 views

magit: how do I turn off the -S (--gpg-sign) argument when committing? [closed]

I forgot my GPG key at home and want to check in the code until I am home and can amend/resign the commits. Unfortunately I can't seem to figure out how to disable the --gpg-sign= argument in the ...
2
votes
1answer
57 views

View file diffs in merge commits

When I open the commit view for a regular commit in magit, I can see the diff for each file. When I open a merge commit, I can only see a summary of the number of lines that were changed. Is there a ...
0
votes
1answer
99 views

Maximum total length for commit message with Magit

I know that it's possible to limit the length of the commit message's first line with git-commit-summary-max-length, but is there a way to limit the total number of characters in a commit message?
0
votes
1answer
66 views

Use magit to find out who wrote the line at point and when

Someone showed me how to do this with "ruby mine" but I don't use ruby mine so hoping emacs / magit can do this. A file in a git repository is opened up in emacs. Point is at line 23, and you want to ...
0
votes
1answer
75 views

Can magit put my commit somewhere up the tree?

I have a rough part of my workflow, wondering if magit is the solution. So when I'm working on a task, I spin off a branch like most people. I end up putting 5 or 6 commits in a branch that's for my ...
3
votes
1answer
82 views

How to set magit recent commit always expand when i open magit status?

When I open a Magit status buffer, then the recent commit section is closed, I need to use TAB to expand it. How can I configure it to always be expanded.
1
vote
1answer
68 views

Magit popup doesn't open in status buffer

Every time I accidentally update Magit to a new version, I come to regret it. :( Today, I discovered that the popup window doesn't work well anymore: instead of opening in the same buffer as the ...
0
votes
1answer
40 views

Setting mode-line font size and Magit diff colours

I'd like to adjust the background colour of the part of the diffs displayed by Magit. In particular, the background colour of the text 1st, 2nd, and 3rd in the image. I'd like to increase the contrast ...
0
votes
1answer
76 views

Pushed commit doesn't appear on Github

I tried updating a repository about 30 minutes ago with only 3 lines being different and it has yet to show up as a commit on Github. Is it typically this slow? It shows that it went through and ...
0
votes
0answers
141 views

Use ssh-agent's SSH_AUTH_SOCK value, not macOS' one [duplicate]

When I run (getenv "SSH_AUTH_SOCK"), I get "/private/tmp/com.apple.launchd.K9OEFgxDgw/Listeners". I want to set it to the value that is returned by echo $SSH_AUTH_SOCK on the command line which is ...
3
votes
1answer
68 views

magit ediff conflicts wordwise

During a magit-rebase I'm running into conflicts on single long lines, where I'd like to take some parts of the line from the A and some from the B buffer. After hitting * -refine current region ...
1
vote
1answer
49 views

CUA doesn't work in magit status buffer

The title is basically everything what I know. CUA keys just don't work in magit status buffer. In older versions, it worked. Sometimes. Now it consistently just doesn't work. Emacs 26.2. Newest ...
0
votes
1answer
60 views

How can you configure magit for duet-commit?

The following code used to work with earlier versions of emacs, adding a ‘d’ option to magit's commit popup for ‘git duet’. (require 'dash) (defvar magit-duet--default-commit-popup-actions nil "...
0
votes
1answer
58 views

How to disable `git-rebase-mode` after magit is installed?

I'd rather use regular text editing functions when rebasing instead of learning magit's bindings. Is there a way to use magit but disable git-rebase-mode?
1
vote
1answer
102 views

How to change window splitting behavior in Magit?

emacs: 26.2 spacemacs: develop (19c429e) magit: 20190609.1424 Some time ago (e.g. 20190222.1746), magit's window management used to be different from how it currently is. For example, magit-status ...
4
votes
1answer
326 views

How to diff one file against another branch with Magit

I want to see the differences of a file in another branch. With git I can simply do: git diff otherbranch: path-to-file. In magit this seems trickier as the file may not be dirty and not showing up ...

1
2 3 4 5
11