Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
18
votes
2answers
3k 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 ...
15
votes
2answers
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.
16
votes
1answer
1k 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 ...
29
votes
3answers
3k 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 ...
14
votes
2answers
1k 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 ...
44
votes
4answers
10k 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, ...
1
vote
1answer
756 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-...
4
votes
2answers
644 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-...
15
votes
3answers
546 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 ...
16
votes
2answers
2k 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 ...
14
votes
5answers
1k 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?
4
votes
2answers
611 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 ...
8
votes
3answers
282 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 ...
7
votes
2answers
528 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 ...
7
votes
1answer
817 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 ...
4
votes
2answers
618 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:
12
votes
2answers
2k 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 ...
3
votes
5answers
461 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 ...
5
votes
2answers
419 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 ...
14
votes
2answers
356 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 ...
5
votes
1answer
2k 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 ...
10
votes
8answers
990 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 ...
4
votes
1answer
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 ...