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

Squashing old git commits that were before a merge

I'm cleaning up a git repo to make it easier to understand. Until now, it's been private, so I'm ok changing history. Mostly, I've been squashing commits together into meaningful sets. The problem is that the project, early in its history, was a…
David Goldfarb
  • 1,796
  • 3
  • 18
  • 32
1
vote
2 answers

magit doesn't recognize repo, can't find git

Magit doesn't recognize my git repos. I think it can't find my git. When i type M-x magit-version i get Magit 20170322.1550, Git (unknown), Emacs 25.1.1, darwin I am using mac osx. my git is here: $ which git /usr/local/bin/git $ git…
user6794223
  • 192
  • 9
1
vote
2 answers

How to create patch for staged files with Magit

How could I create patch for staged files with Magit? I tried "W p", when prompt "Format range or commit(master)", I am not sure what should I put there, I tried HEAD..master, but it doesn't create any patch. I tried command line: "git diff…
Enze Chi
  • 1,733
  • 17
  • 28
1
vote
1 answer

magit: Quickest way to quickly commit changes

I'm in the magic-status window. I've been hacking away in a git repository for about an hour, now I have a bunch of unstaged files, and "untracked" files. Whats the quickest/easiest/minimal-keystroke way to "Save these changes" I'm hoping there…
american-ninja-warrior
  • 7,397
  • 11
  • 46
  • 80
1
vote
1 answer

Is it possible to use Emacs "magit" to manage encrypted file with "git-crypt"?

I would like to manage the versions of encrypted text file with Emacs, with "git-crypt". Emacs has the great encryption tool "epg", and git management tool "magit", but combination of them can not handle encrypted file with git. Is it possible to…
golconda
  • 71
  • 3
1
vote
0 answers

Configure magit to use cygwin ssh with passphrase to push/pull from remote git repository

I followed the steps in https://github.com/magit/magit/wiki/Pushing-with-Magit-from-Windows#git-gui--askpass I installed ssh-agency and configure my .emacs with (setenv "SSH_ASKPASS" "git-gui--askpass") But without success, there is no prompt…
QZHua
  • 354
  • 2
  • 10
1
vote
1 answer

Git: view the complete file for that commitId using magit

On Gitweb, we can see the complete file of a commitId. On Emacs Magit, I can get to that commitID and see the diffs. Is it possible to see the complete file for that commitId via Magit?
iobelix
  • 1,143
  • 1
  • 10
  • 16
1
vote
4 answers

How to put Emacs into magit's commit edit mode from emacsclient

I have set Git's "core.editor" config to "emacsclient" and have an Emacs session running with a server started. When I run "git commit" from a terminal, it opens a new buffer in my Emacs as expected, but this buffer is always in "fundamental mode".…
okonomichiyaki
  • 8,355
  • 39
  • 51
1
vote
1 answer

Magit running git commit takes forever

I am using Emacs on Mac OS with the package Magit. Everything works fine except when I try to do a commit (shortcut: c c). Magit hangs with this message in the bottom bar: "running git commit". What is weird is that when I stop the command…
maroxe
  • 2,057
  • 4
  • 22
  • 30
1
vote
2 answers

Can I make an org-mode link that open a magit-status buffer to a specific directory

I've been using org-mode to make a shortcut file so I can easily open files in emacs that I use a lot. But now I'd like to easily be able to open up a magit-status buffer for partiular repositories. Is there a way to make links in org-mode that…
DavidR
  • 810
  • 2
  • 8
  • 16
1
vote
0 answers

Emacs magit chinese file name displayed as as /320/320/322 in Windows?

My magit use git with cygwin, and my default coding is gbk. I tried to modify the .git/config, but not work. [core] quotepath = false [gui] encoding = gbk [i18n] commitencoding = gbk logoutputencoding =…
QZHua
  • 354
  • 2
  • 10
1
vote
0 answers

Magit Can't Find Git

My emacs plugin magit can't find the right git path. I saw the source code of magit,found magit use this shell command to find git: git.exe -c "alias.exe=!which git | cygpath -wf -" "exe" I don't understand this shell command. But it return the…
lipeiyuan
  • 11
  • 1
1
vote
2 answers

how do I undo rebase in magit?

I don't want the part Rebasing feature/thread-temp onto 02fc3a4771e03d0ba98b9e52305117b4cfa05fce I tried git reset --soft HEAD~1 and recommitting, but it won't save me.. I don't know how I ended up here since I vaguely knows what rebase is and…
eugene
  • 39,839
  • 68
  • 255
  • 489
1
vote
1 answer

make magit display file size

How can I make magit display the file sizes (at least of the unstaged files) in the status buffer? This would help me in avoiding to add large files directly to git. Here is an example of what the status buffer might look like right now: Local: …
Andreas
  • 1,106
  • 9
  • 26
1
vote
0 answers

emacs magit switch to quick mode

I have a merge conflict. I want to resolve it, and I use magit-ediff-resolve. I am presented with the correct list of files to merge (the ones that have conflicts), and then Emacs splits in three correctly. I have, however, to edit the C buffer (the…
nha
  • 17,623
  • 13
  • 87
  • 133