Questions tagged [magit]

Magit is an Emacs mode for interacting with Git.

Magit is an interface to the version control system Git, implemented as an Emacs extension.

Unlike the Version Control package which is part of Emacs and strives to provide a unified interface to various version control systems, Magit only supports Git and can therefore better take advantage of its native features.

With Magit, you can inspect and modify your Git repositories with Emacs. You can review and commit the changes you have made to the tracked files, for example, and you can browse the history of past changes. There is support for cherry picking, reverting, merging, rebasing, and other common Git operations.

Magit's maintainer prefers if questions are asked on the dedicated Emacs Stackexchange site instead of here.

168 questions
1
vote
1 answer

Meaning of "Contained" and "Merged" in Magit

When I look at a commit in magit, I see: Author: My Name AuthorDate: A Date Commit: My Name again CommitDate: A Date Parent: 20f412c1 Commit message Merged: master Contained: devel foo I know that 'parent' is the previous commit…
Joe Todd
  • 814
  • 6
  • 13
1
vote
0 answers

How to use libegit2 with Magit

I use Magit with following conditions. OS: 64bit Windows 10 version 20H2. Emacs: master branch of git repository, built with MSYS2, installed in C:\Emacs Magit: master branch of git repository, built with MSYS2, BUILD_MAGIT_LIBGIT=false Ghub:…
yasu
  • 51
  • 4
1
vote
1 answer

Emacs package management failure in Emacs 27.1

My ultimate goal is to get magit working again with Emacs 27.1 on openSUSE Tumbleweed, but the problem ahead of that is getting (melpa?) package management working - so that is really what this post is about. I run into these problems with other…
PieSwiper
  • 31
  • 4
1
vote
1 answer

how to use magit to diff two different files outside of repo?

I'd like to use magit to diff two files, only one of which lives in a repo. This is addressed for git cli here https://stackoverflow.com/a/5637364 but I can't figure out how to do it with Magit. If it matters, I should also note that I am on…
1
vote
1 answer

Run magit-log with predefined arguments

How can I set some predefined arguments to magit-log and run it using some key binding? Say for example I want to quickly open magit-log with arguments "-n150" "--simplify-decoration" "--full-history" on all branches without doing this via the popup…
A.C
  • 423
  • 2
  • 4
  • 13
1
vote
1 answer

Viewing changes in context with magit

Consider a magit session started with only the two recommended keybinding adjustments. (global-set-key (kbd "C-x g") 'magit-status) (global-set-key (kbd "C-x M-g") 'magit-dispatch) Now suppose that in this session I am merely perusing a repository,…
Calaf
  • 10,113
  • 15
  • 57
  • 120
1
vote
1 answer

How to find when a file was deleted in Magit

Find when a file was deleted in Git is the answer for git, but how to find when a file was deleted, in magit?
Hatshepsut
  • 5,962
  • 8
  • 44
  • 80
1
vote
0 answers

Handling interactive git commands from a magit extension

I'm currently in the process of writing an extension to Magit, which will add the commands from the git plugin Git Town. You can see my current process here. I've worked my way to a rough understanding of how to execute the commands I need to run…
Nathan Cox
  • 1,299
  • 13
  • 24
1
vote
0 answers

Magit-status failing on git directory

I am facing an issue with the Magit on Emacs 25.1.1. When I try to do magit-status on the git directory I get the following error: apply: Setting current directory: Invalid argument, c:/configfiles^M/ I am not able to understand why the ctrl-m is…
1
vote
1 answer

Magit cannot find locally installed git version

I am trying to use Magit and TRAMP together in order to access git repositories on a server from a macOS laptop. The server has git 1.7.12 as default, which is below the required version by Magit. I have installed git 2.9.5 to /my/local/path/bin I…
Charmander35
  • 115
  • 1
  • 11
1
vote
1 answer

How to Stage/Commiting the current buffer in magit?

I see several operations such as log and diff with the magit-xxx-buffer-file syntax which operate on the active buffer. I am looking for the command which would stage or commit the buffer I am editing.
Techniquab
  • 843
  • 7
  • 22
1
vote
1 answer

How can I reset user information on Magit?

I pushed a project from Spacemacs through Magit. It asked about username, email, password. But I must have typed incorrectly. It shows that a person with the same username pushed together. But I couldn't find a way to change user information on…
Peter
  • 301
  • 4
  • 17
1
vote
1 answer

Cannot install magit - unavailable package

I've just copied my .emacs file into a new freshly installed Ubuntu 16.04 and Emacs installed through apt. Anyway magit is the only package that it wasn't able to install. It says: Error (use-package): Failed to install magit: Package `emacs-25.1'…
se7entyse7en
  • 4,310
  • 7
  • 33
  • 50
1
vote
2 answers

magit rebasing uses $EDITOR=vim

I have emacs and git installed for windows (have to use windows for work), everything seems ok when I commit, the comment message pops up in emacs nicely, but when rebasing, I select 'interactively' from magit, I get to choose a commit to rebase on,…
dcai
  • 2,557
  • 3
  • 20
  • 37
1
vote
1 answer

Unable to run emacs in `magit-status-mode` with using custom initialization file

I like to use terminal tools and the one of them is 'magit' - awesome Git client implemented as an Emacs package. I use it to control Git projects. I have a script which automatically start emacs at computer boot (this same me a time with routine…
Ihar Katkavets
  • 1,510
  • 14
  • 25