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
3
votes
2 answers

magit merge conflict `checkout --theirs/--ours`

Sometimes when resolving a git conflict, I'll know that one side is better for a file and I'll resolve it with git checkout --theirs path/to/file. However it is not obvious how to do this in magit, so I always drop to the CLI to do it. Is it…
fommil
  • 5,757
  • 8
  • 41
  • 81
3
votes
1 answer

How to interpret this Emacs magit help screen?

I'm beginning to learn about the magit package for Emacs. The integration is nice. But I'm very confused about how to get help with it. I created a temporary repository, added a file test.org to it and ran the command magit-status. Then I hit ? to…
user1002430
3
votes
1 answer

Using magit in gnu emacs on osx

I am trying to install emacs 24 and magit, however when I try to install magit from the package list, I get the error "Package emacs-23.2 is unavailable". I'm not sure of I need to install emacs 23 too or what.
user1539179
  • 1,835
  • 2
  • 16
  • 28
3
votes
1 answer

Emacs / Magit -- how to create and delete repositories on Github

I am having trouble in Magit with step number 5 and step number 7 to create a new repository. If they exist, what are the interactive function equivalents (please) for steps 5 and 7? If there are no interactive equivalents, I guess I will need to…
lawlist
  • 13,099
  • 3
  • 49
  • 158
3
votes
1 answer

Magit diff doesn't show characters correctly

When I run magit-status through emacs (gui or command line) and show a diff for a file, the color codes don't get escaped properly. Therefore, the whole diff is filled with ^[['s and that makes it impossible to see what's going on. Here's what I've…
mfaerevaag
  • 730
  • 5
  • 29
3
votes
3 answers

How to make magit pull to have rebase option by default?

I recently started using magit package in emacs and its really useful and handy. I would like to make couple of tweaks. How do I make magit pull to be always have rebase option?. Currently it shows up switches and I have to choose -r --rebase. In…
sudurais
  • 189
  • 1
  • 7
3
votes
2 answers

why is vc-git and magit in emacs ignoring my git config settings?

I'm running the official windows binary of emacs 24.1.1 with magit. When I commit a file, the username and email shown on the log are ripped from my account and machine name, rather than using the values set in either the global git config or the…
tenpn
  • 4,556
  • 5
  • 43
  • 63
3
votes
3 answers

How can I diff a file with a specific revision in Git?

I don't know if Git has the concept of a revision. I'd like to diff the current working copy with an older version of it (not necessarily the last commit). It would be great if it could be done inside Emacs.
eugene
  • 39,839
  • 68
  • 255
  • 489
3
votes
2 answers

Is it possible to split a chunk even further with magit?

Possible Duplicate: Splitting a hunk with magit When you review your changes sections you get the chunks as you would when you do for example "git add -p" by default, but I can't find an option to split chunks into smaller chunks as you would by…
gonz
  • 5,226
  • 5
  • 39
  • 54
2
votes
1 answer

Magit: change color of filename in diffs

I find it a little troublesome to distinguish filenames in Magits diffs. I would ideally like to have these in orange, so I can quickly identify where changes for a file begin.
2
votes
0 answers

What is the equivalent to magit pull with rebase flag using fetch instead?

In magit I often use F -r u to pull and rebase my commits on top of the latest from origin. The inefficient part for me when I do this is I often go to the GitHub first to actually see what’s new before pulling. To avoid that step I used fetch…
Palace Chan
  • 8,845
  • 11
  • 41
  • 93
2
votes
1 answer

How do I ignore gitignore in magit?

I have some file extensions ignored in my .gitignore. I'd like to force-stage a particular one of them. Given the C-g magit buffer, how can I get a view that ignores my .gitignore so that I can identify and force stage the single file I'd like to…
Mittenchops
  • 18,633
  • 33
  • 128
  • 246
2
votes
1 answer

Magit does not consider ~/.gitignore

Using magit (version: 20190413.1201) with Emacs 26.1, and I notice that magit ignores what my global .gitignore file (~/.gitignore) says. For instance, tilde files (somefile~) continue to show up in magit, but not when using normal command line git…
n_x_l
  • 1,552
  • 3
  • 17
  • 34
2
votes
1 answer

Run a command based on a commit

We use a third party code reviewing tool here at work. All of my colleagues use the provided app to upload their code for review but unfortunately, this requires a few cut and paste actions. Thankfully, there is a command line version that can be…
cristobalito
  • 4,192
  • 1
  • 29
  • 41
2
votes
1 answer

Kieran healy emacs 25.1.1 starter kit install error magit package unavailable

I'm trying to install Kieran Healy's Emacs Starter Kit (https://github.com/kjhealy/emacs-starter-kit) on linux arch (I have also tried on a Mint installation, running into the same errors), but I'm having quite some trouble. After deleting my…
Emilbk
  • 21
  • 1