Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
3 votes
1 answer
356 views

How to log file following all renames?

I upgraded to recently released Magit 2. There is a command magit-log-buffer-file. However, it logs file without --follow option, which makes it quite pointless for me (in our source code nearly ...
user avatar
2 votes
1 answer
128 views

Font-lock for strings messes up non-code buffers

In Magit buffers, or helm-swoop, an unclosed double quote enables the string highlighting for the rest of the buffer (until another quote is found). This is how it looks like: Because of that, I also ...
Alexander Yakushev's user avatar
1 vote
1 answer
688 views

Automatically quit emacs after git-commit-commit in git-commit mode

I am using emacs -nw as in-place commit message editor for my git. When pressing C-c C-c in git-commit mode, I want emacs to quit automatically. Currently, .git/COMMIT_EDITMSG is saved, and the buffer ...
Martin's user avatar
  • 115
2 votes
1 answer
131 views

Should magit revert a buffer after I discard a change from it when magit-auto-revert-mode is t?

With magit 1.4.1, I have magit-auto-revert-mode set to t. When I visit a file in a buffer, make a change and save, then call magit-status and run magit-discard-item on the modified file, then switch ...
sandinmyjoints's user avatar
3 votes
1 answer
410 views

Why does magit give so many "reverting buffer" messages?

I am still very much a beginner when it comes to version control, and am using magit. It seems like committing changes (frequently but not always?) triggers "reverting buffer" messages, one for ...
Brian Z's user avatar
  • 2,823
11 votes
1 answer
1k views

Magit custom commands

Magit displays the progression of multi-step commands with popup windows. For example, pressing c brings up the commit menu, whence pressing a will invoke magit-commit-amend. I would like to include ...
Matthew Piziak's user avatar
46 votes
2 answers
17k views

How can I discard changes to unstaged files using magit?

Is there a way to issue the command: git checkout NameOfFile on a modified and unstaged file from within MAGIT?
user2522280's user avatar
2 votes
1 answer
93 views

Where is this `make-magit-section` function defined?

I'm looking at the magit source code, and there's this make-magit-section function that doesn't seem to found anywhere in the project (grep doesn't return any results). describe-function says that ...
john2x's user avatar
  • 429
2 votes
1 answer
276 views

"C:/c/user/...my-folder/ isn't an existing directory" error

I use Emacs 24.5.1 with Spacemacs and added Msys2 to the exec-path to use git.exe When I run 'Magit-status' I get the following error: C:/c/user/...my-folder/ isn't an existing directory. I can see ...
RafaelGP's user avatar
  • 291
6 votes
1 answer
1k views

Stage diff hunk into git from ediff?

How do you stage a hunk into git from ediff? I'd like to be able to view a side-by-side diff and stage hunks into the "HEAD" side of the diff, but that buffer (i.e., spacemacs.~master~) is read-only. ...
idbrii's user avatar
  • 293
2 votes
2 answers
1k views

customize-face magit-item-highlight properly

I have a problem with the magit-item-highlight in different themes. With monokai, zenburn, etc., the item highlight is a background, and does not interfere with green and red diff faces. However, with ...
sooheon's user avatar
  • 481
14 votes
2 answers
2k views

Is it possible to limit magit's log view to just commits from the current branch?

Currently when I bring up the local magit log ("l l") it takes a fair amount of time. It would be nice for the log just to limit itself to the nearest merge base (e.g. vs origin/master) but I haven't ...
stsquad's user avatar
  • 4,616
61 votes
4 answers
16k views

How to easily cherry pick with magit?

I've been using magit for a few months now and I like it a lot. But one thing I still do it in a terminal is cherry picking. What is a simple way to do this?
caisah's user avatar
  • 4,026
2 votes
1 answer
1k views

How do I clean up my local commits and rebase to upstream master in magit?

I have forked the interleave package. I made certain commits in my fork but now I want to discard them. I added the remote upstream branch (master branch by the interleave author), fetched it and ...
Kaushal Modi's user avatar
2 votes
2 answers
781 views

How do I prevent magit from asking to set upstream while pushing?

When I want to push to a different upstream than origin, I use P C-u C-u P so I can set the upstream of the command, however magit always prompts me with question to set upstream also. How do I ...
PuercoPop's user avatar
  • 396
-1 votes
1 answer
412 views

Magit fails to create local repository

This is what I got when I select a directory (whether it had a git repository) and choose "yes" when magit asks if I want to create one: Debugger entered--Lisp error: (wrong-type-argument stringp nil)...
dmvianna's user avatar
  • 370
0 votes
1 answer
920 views

magit fails to install

I am unable to install magit with package.el. While other packages install correctly, magit (v 90150116) currently gives me: Debugger entered--Lisp error: (wrong-number-of-arguments #[(ad--addoit-...
dmvianna's user avatar
  • 370
1 vote
1 answer
117 views

What is happening when my uncommitted changes temporarily disappear from magit?

More then once when I have been reviewing changes to be committed in magit, the pending changes have unexpectedly disappeared from the status buffer. I'm pretty sure it's because I am accidentally ...
Brian Z's user avatar
  • 2,823
61 votes
1 answer
8k views

Can I checkout a given commit from magit's log view?

I'm exploring a git repository history using magit's log view using l l. Can I checkout a given commit from there without going to terminal?
Rafa de Castro's user avatar
9 votes
3 answers
3k views

Get git repo root directory, preferably with magit

How can I get the root directory of the current git repo? I could run shell-command-to-string on something like git rev-parse --show-toplevel. Is there a better way? Does magit or any other git front-...
Pradhan's user avatar
  • 2,310
33 votes
3 answers
12k views

Untrack file without deleting it?

I have a tracked file in a git repository. How do I untrack this file without deleting it using magit?
deadghost's user avatar
  • 807
8 votes
2 answers
1k views

Default commit comment for magit

Is there a simple way to have default text pre-populate in the comment buffer when commiting code with magit?
qhfgva's user avatar
  • 81
68 votes
2 answers
13k views

How can I open a specific revision of a file with Magit?

Is it possible to open a specific revision of a file in Emacs with Magit without changing the current branch? I have rebased some local changes to a revision where the modified functions were ...
David Holm's user avatar
  • 1,169
26 votes
2 answers
5k views

How can I list available tags in Magit?

I would like to list the available tags in Magit in order to diff a specific revision, is this possible? Specifically what I am after is to list the revision history at a certain tag and then view ...
David Holm's user avatar
  • 1,169
15 votes
2 answers
1k views

Can Magit do git format-patch?

I just wanted to know if Magit has this functionality. The reference manual does not have this explicitly so that's why I am asking.
CestDiego's user avatar
  • 153
17 votes
1 answer
2k views

How to access command switches in Magit

Most magit commands are invoked with a single key, which pops up a menu of subcommands and switches. For example, P shows P and t as subcommands and -f and -u as "switches." Hitting the letters for ...
ddoherty's user avatar
  • 173
51 votes
3 answers
8k views

Magit split hunk into two hunks

There's a question on SO about splitting hunks using magit, and the two solutions given are to either stage the region (mark a region, hit stage), or to shrink/grow all hunks using + & -. That's ...
Squidly's user avatar
  • 1,499
14 votes
2 answers
2k views

Git: is it possible to stage a selected region directly from the file buffer?

With Magit you can open the magit status buffer, press TAB to expand the diff (or RET to bring up a separate diff buffer), mark parts of a hunk and press s or u to stage/unstage the region. Really ...
Nsukami _'s user avatar
  • 6,281
57 votes
5 answers
15k views

Change a branch's upstream with Magit

When you push a branch with Magit (with P P) and the branch has no upstream, Magit asks you the name of the branch you want to push to. That's great. Once you set the upstream for a branch, however, ...
Malabarba's user avatar
  • 22.8k
1 vote
1 answer
979 views

How to set magit remember git passphrase on Windows?

I run magit on Linux and it works very well. On Windows, it works almost the same except the push process: Git Bash would ask me to enter passphrase to continue, while magit just hangs. I set ssh-...
Nick's user avatar
  • 4,373
4 votes
2 answers
859 views

Which version of magit am I installing?

Here is a snapshot of my list-package result related to magit: Question: There's nothing in my init.el on marmalade, why the package from marmalade are also listed? If I run M-xpackage-...
Nick's user avatar
  • 4,373
15 votes
3 answers
801 views

Command to visit Github pull request of current branch with Magit

It's very common that, after pushing a given branch upstream, I'll want to visit it on github and create a pull request. I'm starting to get annoyed at having to manually visit the repo, find the ...
Malabarba's user avatar
  • 22.8k
23 votes
2 answers
4k views

How to checkout ours/theirs on a file in magit?

Let's say I have a merge conflict. I see a conflicted file like this: Unstaged changes: Unmerged Foo/bar/wibble/plop/elbow.txt I can hit tab here to open the changes and maybe jump to a point ...
tenpn's user avatar
  • 395
18 votes
5 answers
2k views

How can I make `--verbose` flag be enabled by default in magit commit screen?

Right now, instead of pressing just cc in magit-mode, I have to press c-vc every time to enable --verbose. Is it possible to make it enabled by default?
Dogbert's user avatar
  • 283
4 votes
2 answers
947 views

How to make vc-* and magit treat a symbolic link to a real file in git repo just like the original file?

Say, I got ~/.emacs which is a soft link to ~/.emacs.d/init.el(using ln -s ~/.emacs.d/init.el ~/.emacs) which is in a git repo, because this will make it easier to reach init.el, outside or inside ...
CodyChan's user avatar
  • 2,589
8 votes
3 answers
392 views

How to scroll up when expanding a section in magit-status?

In the magit-status buffer, pressing TAB shows or hides a given section, which is handy when looking at unstaged content and see what hunks can be staged. However, when tabbing on a section, the ...
Sébastien Le Callonnec's user avatar
7 votes
2 answers
695 views

Can I have the git-log "--all" option be initially selected?

When I press the "l" key in the main Magit status mode, it pops up a window where I can adjust the options to be passed to the magit log command. Can I arrange for the --all option to always be ...
Sean's user avatar
  • 919
7 votes
1 answer
1k views

How to make `truncate-lines` nil and `auto-fill-mode` off in magit buffers

I got (setq-default fill-column 80) (setq-default truncate-lines nil) ;; which is default When using magit in Emacs, I know that I should avoid long commit messages, but sometimes they just cannot ...
CodyChan's user avatar
  • 2,589
5 votes
2 answers
980 views

How to get colors in Magit diffs on Windows?

Color codes are not working on my Windows 7 box. I have working colors in Git Bash that comes with the Git install. Here is what I get:
syl20bnr's user avatar
  • 2,095
13 votes
2 answers
3k views

How do I force a specific buffer to open in a new window?

When committing changes in Magit, it is useful to have the diff view open while adding details about the commit. In Magit, we see the diff in the *magit ..* buffer. When you hit cc while the cursor ...
Kaushal Modi's user avatar
3 votes
5 answers
764 views

How to get a major mode to open full screen

I'd like magit to default to a large buffer instead of one that is half the size of the available space. Even better would be a way to wrap the call to a major mode to make this happen when opening ...
Aaron Lee's user avatar
  • 377
5 votes
3 answers
880 views

What is the best way to reload git stashed changes you've popped while file is open in buffer?

When I'm viewing a file and then pop a stash which modifies that file in the working tree using git stash pop in either bash or eshell, what is the best way to immediately see those changes in the ...
Gina's user avatar
  • 153
15 votes
2 answers
595 views

Magit pushing / pulling show progress

I'm missing some visual indication of the push / pull progress. After executing the appropriate command, magit prints Pushing to domain.tld:repo.git however, no further indication of the ...
elemakil's user avatar
  • 2,507
5 votes
1 answer
3k views

magit: how to set default username?

Is it possible to set a default username (i.e.: my Github user name) for magit? It is prompting for the user every time I have to push a commit. Don't know if this may help with the answer, but I ...
Boccaperta-IT's user avatar
10 votes
8 answers
1k views

magit-push hangs on Windows

I'm using GNU Emacs on Windows, and I am unable to use magit-push to push my local changes to a remote repository. This happens with remote repositories regardless of if they are accessed with SSH or ...
Ryan's user avatar
  • 3,969
4 votes
1 answer
3k views

Magit on Windows: "searching for program: permission denied, git"

I installed Magit on Windows, but every time I use it, it give me the error: searching for program: permission denied, git even though I already installed the git software on windows. (it seems ...
Husain's user avatar
  • 485

1
10 11 12 13
14