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

Magit: Is there a way I can toggle --ignore-all-space option for the default magit-status buffer?

In the magit-status buffer I can press d-wd on a file to open a magit-diff buffer with the diff of that specific file without whitespace changes. When I go back to magit-status though, the diffs there still show the original whitespace changes. I'm…
irregular
  • 1,437
  • 3
  • 20
  • 39
13
votes
2 answers

In magit, how do I see a diff what a branch adds to my current branch?

In the Magit Refs buffer, you can press tab on a branch (the branch I want to merge in) to see what commits would be added if this branch were merged into the currently checked out branch, and you can press enter on the commits to see their changes.…
ryantm
  • 8,217
  • 6
  • 45
  • 57
13
votes
2 answers

Emacs Magit commit opens new Emacs client

I've been using Magit for awhile, and when committing, it used to simply split the window and allow me to commit from within the same emacs session, but I seem to have changed this behavior to the following: Now, when I commit my staged changes, a…
FellyTone84
  • 665
  • 8
  • 18
11
votes
1 answer

How do you refresh the remotes in Magit?

Magit is really nice, but I have yet to figure out how to create a remote branch from it, or how to refresh the remote branches it knows without deleting the remote and adding it back in. Currently I go to github, add a branch, then go into magit,…
user967953
  • 173
  • 2
  • 7
10
votes
5 answers

Magit is very slow when committing on Windows

Magit takes enormously long time to commit a file. Absolutely disproportional to any other task - can take several minutes, or else I give up and commit it from the shell. Is there any reason to it? How can I debug it? Interestingly, if I kill…
user797257
9
votes
3 answers

How to Use Magit Even More Effectively?

After an several-hour trial upon git using shell, I switched to magit It's pretty neat and efficient: I don't need to type "git" to invoke a git command anymore! But I still found one drawback comparing shell command line Every time I typed : to…
sfszh
  • 668
  • 1
  • 6
  • 8
9
votes
2 answers

Magit save password and username

Magit is a good option for using Github. When I want to push my commits to Github, it always asks my username and password. How can Emacs save my password? Best regards.
itirazimvar
  • 859
  • 1
  • 10
  • 20
9
votes
3 answers

Emacs: Update git-gutter annotations when staging or unstaging changes in magit-status buffer

I use git-gutter for visualizing changes I make to version-controlled files, and magit for staging/committing/diffing etc. When working on a project I usually keep a magit-status window open at all times. The problem I have is that when I stage or…
itsjeyd
  • 5,070
  • 2
  • 30
  • 49
8
votes
2 answers

Magit - rename last commit

How do I rename the last commit in Magit (ie. edit the commit message) ? I can see it in magit-log-buffer-file, but I don't know how to interact with it.
nha
  • 17,623
  • 13
  • 87
  • 133
8
votes
6 answers

How do you list tracked files (git ls-files) in magit?

How do you list tracked files (git ls-files) in magit?
eludom
  • 477
  • 5
  • 6
8
votes
1 answer

why magit said ' Git is already running' when i am trying to do a commit

i am using magit in emacs , when i try to commit a change by type C-c C-c the output console shows' Git is already running', as i checked thru Git bash , it did not generete any commit .
zolibra
  • 532
  • 6
  • 16
7
votes
2 answers

How can I remove trailing whitespace from a hunk in Magit?

Emacs (post v21) includes a function to delete trailing whitespace from a file. How would I make delete-trailing-whitespace available in the Magit staging area (from magit-status) so that I can remove trailing whitespace from individual hunks or…
Sean Allred
  • 3,558
  • 3
  • 32
  • 71
7
votes
1 answer

how to deactivate vc-git in GNU Emacs?

I created a Git repository for the folder with my Emacs text files, then installed git.el and Magit. Emacs seems to have slowed down a lot, and I keep seeing the message loading vc-git...done in the minibuffer. Am I right in thinking that…
incandescentman
  • 6,168
  • 3
  • 46
  • 86
6
votes
1 answer

magit over tramp: re-use ssh connection

magit seems to open a new ssh connection for every command. This becomes very annoying especially when staging more chunks, which takes noticeable time to establish the connection for each chunk. (from shell, I have persistent ssh connections…
Andreas
  • 1,106
  • 9
  • 26
6
votes
1 answer

Magit: Can I reverse a hunk from a previous commit?

If i'm looking at the log messages and select one specific commit to view the diff is it possible to revert (or reverse appply) a specific hunk of that commit? I know there is a revert commit option but i'm only interested in one small part of…
Gonçalo Marrafa
  • 2,013
  • 4
  • 27
  • 34
1
2
3
11 12