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.

159 questions
11
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
  • 7,676
  • 6
  • 39
  • 57
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
  • 163
  • 2
  • 7
11
votes
5 answers

How to change repo with magit emacs?

I need to work with a few different git repositories. How to switch between them using magit? Magit allows me to choose a directory when I just start it.. But it is not clear for me how to switch to another repo if required. I've looked at magit…
kikulikov
  • 2,302
  • 3
  • 24
  • 37
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
1 answer

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
  • 709
  • 1
  • 8
  • 20
8
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
  • 638
  • 1
  • 6
  • 8
8
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
  • 4,739
  • 2
  • 26
  • 47
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
  • 520
  • 5
  • 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,206
  • 2
  • 28
  • 62
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
  • 5,479
  • 1
  • 37
  • 75
6
votes
2 answers

Emacs + magit - vertical blame

I recently decided to switch from vim to spacemacs, which has already magit included. When working with Vim it is very easy to show :Gblame, and it shows vertical menu with commits, its author and side by side code (similar how to original git blame…
Michał Darda
  • 91
  • 1
  • 6
6
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
  • 16,039
  • 11
  • 76
  • 108
6
votes
2 answers

Can't seem to push to GitHub using magit

I am attempting to push to a GitHub repository using Magit on Emacs 24.3.1. Note, I'm on a Windows box. I have staged and committed changes to a file and M-x magit-status reflects only untracked files that are resident to my clone of the repo. To…
PatternMatching
  • 426
  • 2
  • 13
6
votes
1 answer

Emacs -- How to push a Git repository to multiple remotes

I'm looking for some assistance, please, using Emacs / Magit to push the local repository changes to the remote website and to Github in one fell-swoop. I found a non-Emacs / non-Magit related thread ( https://stackoverflow.com/a/3195446/2112489) ,…
lawlist
  • 12,283
  • 2
  • 31
  • 129
5
votes
0 answers

Reload all open files in emacs after git branch change

Possible Duplicate: How can I get Emacs to revert all unchanged buffers when switching branches in git? I have more than 15 files of the same project open in emacs. When i change the branch in git i have to manually reload all files again. Is…
Scaraffe
  • 3,891
  • 4
  • 19
  • 19
1
2
3
10 11