Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
1
vote
1answer
38 views

Is there a way to selectively stash in Magit without indexing?

Is there a way to stash changes in magit selectively, akin to: git stash save -p <paths>
8
votes
1answer
373 views

Change the default visibility of a Magit section

I have a fork of popular repo, I want to be able to keep track of commits being push to that repo while also having my own personal commits to my fork. I don't really want my changes to be merged ...
2
votes
1answer
48 views

How can I log the commands magit uses for values?

I'm bringing up a new machine and some operations are very slow. I'd like to re-run the commands magit is sending in a normal shell so I can use perf to see where time is being spent. magit-git-debug ...
5
votes
2answers
476 views

Merge specific files with magit

Is there a way to merge single files in magit like you would do from this question or something equivalent. Namely: $ git checkout source_branch -- <paths>...
1
vote
1answer
391 views

How to save remote repo credentials

Linux Mint Emacs 25.1 Remote repo URL origin (h t t p://git.remotehostname.git) In application SmartGit when I pull/push data from remote repo, it's prompt credentials ONLY ONCE. But when I try ...
0
votes
1answer
48 views

Magit - remove confirmation when popping stash

Is there a way to remove a confirmation when popping a stash? Documentation say nothing about popping the stash. It says however that when dropping more than one stash, it has the confirmation by ...
1
vote
2answers
523 views

magit with tramp is not working with git correctly

I installed magit. I added the following lines to my .emacs: (require 'tramp) (push "/path/to/git/directory/" tramp-remote-path) And when I am in tramp I run M-x magit-version here is the output: ...
2
votes
1answer
51 views

Is it possible to disable magit calling :git branch --remote --contains <foo> when doing an interactive re-base?

I'm running on fairly large repository (Gentoo's portage, 2.5G .git) and slightly slow hardware (1Ghz arm64) and interactive re-basing is very slow. It seems the main culprit is "git branch --remote --...
1
vote
1answer
196 views

Spacemacs+magit+helm checkout hide branches

Due to my workflow I have a lot of branches that I don't want to see in the magit helm checkout window. Is there a way to hide some branches here, preferably with a regexp?
2
votes
1answer
48 views

Magit, an easy way to see if there is more than one line of comments in Magit-Status

To clarify I know about magit-revision i.e. spacebar but there doesn't seem to be a clear way to tell if a commit has more than one line of comments or not. What I'm talking about is this: be93ed0 ...
0
votes
2answers
158 views

Show a list of names for all git projects

Windows 10, Emacs 25.1, Helm, Magit I have many git projects in different folders. Is it possible to show list of names for all git projects in one buffer?
0
votes
1answer
148 views

how to add a default-on option of magit log

Since the 'log --graph' is slow in the repo with long history, I wanna add '--since' option for it. I tried to add the following lines in my '.spacemacs' file. (magit-define-popup-option 'magit-log-...
5
votes
1answer
418 views

Magit equivalent for “git branch | git branch -d”

I just learned about magit-remote-prune for cleaning up stale remote branch. For merged local branches, I often use git branch | git branch -d to clean up. Is there a way to do that in Magit; ...
0
votes
1answer
196 views

Create and checkout to new branch by one command

If I need to create new branch and checkout to it I use two commands: 1.magit-branch 2.magit-branch-checkout Is it possible by one command to create AND checkout to new branch?
0
votes
1answer
52 views

How do I get better indication that my git configuration is wrong?

I ran magit-status, and was surprised by the absence of changes. It turned out that I'd misconfigured my git textconv settings, so 'git diff' was returning an error. However, I saw no indication of ...
4
votes
1answer
786 views

How do I visit a file on a different branch?

I'm aware of C-x v ~ which allows you to see a different revision of the current file, but I would like to visit the file on another branch. Is this possible with magit, VC or git-timemachine?
1
vote
1answer
594 views

Search through logs by author/comitter name in magit log buffer

Once I enter into the logs for a repo from the status buffer (using ll) how do I search through the log buffer by username? Just using regular isearch doesn't seem to pick up the author names in the ...
2
votes
1answer
292 views

how make “magit log” show entire log message

I have a commit with a message like this: Contact Inquiries todo: current user detection import old table actionmailer + mailgun Magit log only shows "Contact Inquiries", and not the other 4 lines. ...
1
vote
1answer
170 views

git-commit-mode with flyspell very slow

I use emacsclient as my git commit editor. This is what I have in my init file: (require 'git-commit) (add-hook 'git-commit-mode-hook 'turn-on-flyspell) I just made a huge commit (update of a third-...
20
votes
1answer
1k views

In Magit, what is the difference between a 'stash' and a 'snapshot'?

The Magit user manual includes two sets of "stashing" commands: lower-case commands save a stash, and upper-case commands save a snapshot. After consulting Google and Stack Overflow and the git-stash(...
7
votes
2answers
4k views

How to install a specific version of package?

When I do M-x package-install RET magit it installs the latest version of magit which is 2.1.0. I want to install magit 1.4.2. I don't want to do it manually by downloading and loading package. ...
1
vote
1answer
166 views

make-magit-popup-event: Symbol’s function definition is void: record [SOLVED]

I get the above message using the latest magit from melpa. This occurs with GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-12-20 on Ubuntu 16.04. Any ideas?
0
votes
1answer
124 views

Signing merge commit with magit

I know how to sign standard commits using magit, but I'm not able to sign the commits generated by merges. Is there any way to do that?
0
votes
2answers
397 views

commit by saving and then killing the COMMIT_EDITMSG buffer in magit?

I understand that in magit the normal way to commit after editing the commit message buffer would be C-c C-c However in using git from the command line --- with Emacs as the editor for commit ...
0
votes
2answers
122 views

How can I get a prompt for deleting index.lock file in magit?

This is a long standing issue https://github.com/magit/magit/issues/2708 . I feel that a prompt for deleting the transient file would compensate in most cases. Is there a reliable way to achieve this? ...
2
votes
1answer
56 views

How to echo each magit command after each action?

Although I can use $ to see the command histories, I'd like to see it immediately each time I performed an action. E.g. Display git push -v origin master\:refs/heads/master after P p.
49
votes
4answers
11k 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
2answers
109 views

Magit shows magit-diff with HEAD^ instead of HEAD when invoked from console

When I start a commit from console (zsh on mac os Terminal) using git commit -a, then Emacs opens two windows as emacsclient in my existing Emacs App Window. One is the correct COMMIT_EDITMSG. The ...
0
votes
1answer
130 views

Magit: enable `toggle-truncate-line` in diff-mode

I'm working with tex files that have usually long lines of text. I enabled in magit the fine coloration of errors by using: (setq-default magit-diff-refine-hunk 'all) and now I'd like to disable the ...
18
votes
2answers
930 views

How to pronounce “magit”?

Q: How does one pronounce magit? It occurred to me today that I've never said "magit" out loud, and I'd prefer not to make a fool of myself if I ever have to do so. So: is the g in magit pronounced ...
4
votes
1answer
801 views

Magit asks for passphrase for ssh key every time

Running emacs 25.2.2 magit 2.12.1 on Kubuntu 18.04. I have set-up ssh keys for my bitbucket repository and I run ssh-agent on start. When I fetch or pull or push, magit asks for the passphrase for ...
15
votes
2answers
449 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 ...
0
votes
1answer
128 views

Magit - “user” in Branch / Create from Pull Request

I've been using Magit for a long time, but finally read the manual, and started playing in the deep water. Not sure how to fix what I did... I tried b Y (Branch / Create from pull request). It asked ...
0
votes
1answer
109 views

temporary change magit-display-buffer-function

I have create this little helper to easy jump to my last used git projects, I using magit-status-internal to open a status buffer and I set magit-display-buffer-function so that the status is open in ...
0
votes
1answer
42 views

Why is the Magit M Remote pop-up different than what is shown in the Magit manual?

The Magit manual, 7.1.1 The Remote Popup, describes the following three commands, but they do not appear in my 'M' popup: M C (magit-remote-config-popup) M p (magit-remote-prune) M P (magit-...
0
votes
1answer
33 views

How to execute a function on the name before creating a branch in magit?

I want to execute the following function on the provided name before creating a new branch in magit: (defun pb/magit-new-branch-name (branch-name) "create a name usable as a branch name from branch-...
15
votes
2answers
1k views

Manage several git repositories from magit

I'm maintaining several git repositories using magit, and their numbers keep growing. Is there a way to inform magit of all these projects so that a single command would present a summary of the ...
0
votes
2answers
126 views

Stage changes in just the first line of hunk

Consider the following situation: $ printf $'line1-v1\nline2-v1\n' > test.txt $ git init . $ git add test.txt $ git commit -m 'Initial commit' $ printf $'line1-v2\nline2-v2\n' > test.txt Now, ...
2
votes
1answer
48 views

Latest Magit expands hunks after staging

With the latest version of Magit (20180410.432) I feel that the staging behavior has somewhat changed. Before, I used to expand the unstaged files in the Status Buffer, then stage the hunks one by one....
3
votes
1answer
194 views

highlight-chars and magit is conflicting

first time StackExchange user here. I'm having trouble with highlight-chars (probably font-lock) and magit. Enabling hc-toggle-highlight-* functions will remove the coloring from magit buffers. ...
2
votes
1answer
3k views

Magit - How do I sync my feature branch with the latest master without checking out master?

Here's what I am trying to do:: I have one project in one git repository. I've made some changes in master and created a spinoff branch (b s) called my-feature. Now I've finished my feature and would ...
2
votes
1answer
506 views

How can Magit add a credential to ssh-agent?

Can I make Magit add my ssh passphrase to ssh-agent instead ask me to use the passphrase a single time? Every time I push a commit to my remote I need to type my passphrase or instead run M-& ssh-...
18
votes
2answers
1k views

Magit log dates

In Magit log buffer commits (one per line) are shown with relative date. This is nice for recent commits, but makes little sense for older changes. In particular, this makes it annoyingly hard to ...
3
votes
1answer
154 views

git rebase -x (“exec”) with Magit?

Is it possible to use the "exec" mechanism when rebasing with magit? From the git rebase man page: -x <cmd>, --exec <cmd> Append "exec <cmd>" after each line creating a ...
4
votes
2answers
2k views

How to setup upstream remote using Magit?

I am reading through the magit manual trying to figure out how to configure remote variables. From the magit manual "7.1.1 The Remote Popup" on https://magit.vc/manual/magit/The-Remote-Popup.html : ...
4
votes
2answers
2k views

How can I compare two commit diffs in magit?

I want to directly compare the diffs of two commits in emacs (rather than seeing the diff of two trees at given commit points). A bonus would be being able to use ediff mode to compare the two ...
1
vote
1answer
75 views

How can I determine if a `git` branch is a remote-tracking branch using Magit?

Is there a function magit-magic such that (magit-magic "master") => t (magit-magic "origin/master") => nil assuming origin/master is a fetched, but possibly unpulled branch on remote origin? (...
3
votes
1answer
810 views

How can I tell magit to ignore specific modified files?

I am working on a project where webpack's bundle.js is part of the repository. This file is gigantic and has many diffs and slows magit down. Is there a way I can tell magit to ignore this file when ...
0
votes
1answer
307 views

How to move master to branch in magit?

This is how I move master to branchX in git: $ git checkout master #move HEAD to master $ git branch -f branchX HEAD #move by force, HEAD to branchX Is there a way to do that in Magit?...
1
vote
1answer
94 views

magit function to check if a branch is in sync with remote

Is there a function in magit to check if a branch is in sync with with it's remote (basically I want to check if both branches sit on the same commit) At the moment I check if remote branch and the ...

1
3 4
5
6 7
11