Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
0
votes
1answer
16 views

In Magit, the command `magit-status` opens the buffer with the status buffer. Is there some similar command to do the same but with the Slime's REPL?

I am using Emacs powered with Slime to write code on Common Lisp (SBCL). In addition, I am also using magit. Magit has a handy command called magit-status (C-x g). I use it a lot and I tend to have 2 ...
0
votes
1answer
12 views

provide optional parameter for magit

I am tracking my dotfiles by using this approach. This is very useful method to track files which are in different locations. Short summary of the blog. alias dotfiles='/usr/bin/git --git-dir=$HOME/....
2
votes
1answer
43 views

How to see only the local branches created by me on Magit?

When I am working on the Command Line Interface, I can do: $ git branch Then, I can see all the local branches that I have created. On Magit, If I do b l (check out local branch), there is a prompt ...
0
votes
0answers
17 views

Using with-editor and custom key bindings

I am trying to use the with-editor package with the kubectl edit command in the kubernetes-el package. I proposed a patch for the same. I am trying to understand how to create custom key bindings like ...
0
votes
0answers
16 views

Directory navigation in magit

I have a great experience working with a flat repository structure in magit. I find it more cumbersome to navigate in and out of directory structures when I want to some but not all of the files in a ...
0
votes
0answers
44 views

Add remote from magit for new repo

When creating a repo on a git server and wanting to push your existing local repo for the first time, how do I set the remote? M a seems to not like me inputting the url, or a name like "origin&...
1
vote
1answer
16 views

Why this magit process happens after pushing some changes to a remote repository? How to avoid it?

After pushing some changes to a remote repository using magit, Emacs shows this process running: git-credenti... 72390 run *git-creden... /dev/pts/1 git credential-cache--daemon /home/pedro/....
3
votes
1answer
121 views

How to use `--no-edit` flag in a `git commit --amend` process inside magit?

If I am using the terminal, after staging some changes, I can do: git commit --amend --no-edit This will insert the staged changes on the previous commit. The editor to edit the message was not open ...
1
vote
1answer
97 views

Magit becomes very slow in spacemacs

I am a on and off spacemacs user for a long time but I have recently started working on some bigger projects and so I started investing some more time into improving my workflow and in particular I ...
0
votes
1answer
30 views

Ignore file encoding in diff

My magit diff is full of "differences" where there is no visually discernible change. I've adjusted every Magit Diff Option. Configuring magit to ignore line endings, tabs, whitespace, and ...
0
votes
0answers
19 views

How to run clean-up code once magit has completed a re-base operation?

My emacs customisation has grown some considerable hairballs while I've been writing helpers to update commits. The idea being that when I re-base I can tag all the commits that need updating and work ...
0
votes
0answers
25 views

Howto detect whether ssh server is online from elisp

When using magit-gerrit for git gerrit reviews and magit-gerrit-ssh-creds is set then magit-gerrit assumes that there is a gerrit server and tries to connect to it using ssh subprocess. The problem is ...
0
votes
1answer
27 views

Git track flag in Dired

How can I show an additional column in Dired, where I can see if the file is tracked or not by git in the current branch?
0
votes
0answers
17 views

Magit-transient: dynamic choices?

I am trying to make the choices in my transients dynamic but I cannot figure out how. Right now, the choices are only evaluated when loaded. Here's a static example: (define-infix-argument choice-rt ()...
1
vote
1answer
43 views

Why I am unable to squash these commits on magit?

I am trying to squash some commits using magit. I tried two different approaches choosing different commit ids to pick and squash. Despite the fact that none of them worked out, the error messages ...
0
votes
2answers
42 views

Retrieve file from an earlier commit

I am using Doom Emacs 2.0.9 on Emacs 27.2. I use magit to manage a local git repository. In an earlier commit, there was a file. In the latest commit as well as the current working tree, the file no ...
1
vote
1answer
34 views

Undo stage hunk in magit

If I accidentally staged a hunk that I wanted a better look at, how do I undo that action (the most recent action). C-/ does not work. Sure I can U to unstage all, but say all else staged is valid.
0
votes
1answer
32 views

How to install transient package?

...Magit depends on the dash, transient and with-editor libraries which are available from Melpa and Melpa-Stable. Install them using M-x package-install RET RET. Of course you may also install them ...
0
votes
1answer
30 views

Log with --first-parent option

How can I tell magit to use the --first-parent option? I only want to see commits onto this branch, none from merged branches.
2
votes
0answers
26 views

How do I jump to the previous/next modification (relative to the git HEAD) in the current file?

How do I jump to the previous/next modification (relative to the git HEAD) in the current file? Ideally, I like sth like swiper that lets me choose to easily jump between modifications.
0
votes
0answers
34 views

Automating git rebase and solve conflict

I have a script can solve some conflict on certain file. How can I automate the work flow to do the following? Run git rebase If has conflict, run script try to solve it. Then run git rebase --...
0
votes
0answers
27 views

Use all-the-icons in magit-repolist-column-flag-alist

I am trying to get magit-repolist-column-flag-alist to use icons from all-the-icons.el but with no success. This is the code I tried. (setq magit-repolist-column-flag-alist '((magit-untracked-files ....
0
votes
0answers
43 views

Duplicate headllines in org mode in CentOS

CentOS 7 Emacs 27.1 Magit Here my folder with org mode files: I open current.to.do.org and it success open. As you can see the first headline is ANDROID and last headline is TESTING. Nice. Now I ...
1
vote
1answer
69 views

How to copy commit hash from Magit status buffer?

After I open a Magit status buffer and make a commit, I commonly also want to copy that commit's hash (the shortened version) to my clipboard to post somewhere else. I can't work out how this should ...
0
votes
0answers
15 views

magit status buffer disappears

Magit status used to create a buffer with the buffer name magit: repo name. I recently upgraded Spacemacs and the Magit status buffer started to disappear whenever its window was not visible, and it ...
0
votes
0answers
28 views

Remove stale buffers after switching to a different branch

This is the scenario: Switch to a new git branch Open some "new files" in that branch Switch back to an older branch that doesn't have these "new files" I want these opened ...
0
votes
0answers
12 views

How to show full diff when using `Limit to files` in log?

When showing the log, there is an option to limit the log to commits touching a set of files. The log itself is fine, but when I open any commit on the log, the diff of that commit is limited to the ...
0
votes
1answer
16 views

Complete in-progress merge with the --no-verify option

Often when I'm merge the upstream branch into my branch I'll need to fix up some merge conflicts. At that point I have an in-progress merge. When I fix the conflict and hit m to complete the merge ...
0
votes
0answers
46 views

Can magit truncate to 50/72 lines?

A common git style rule says that commit messages should be at most 50 characters long and commit descriptions at most 72. Can magit truncate the lines in the COMMIT_EDITMSG buffer in accordance with ...
2
votes
1answer
63 views

magit equivalent to `git push -u origin newLocalBranch`

I often create new branches locally (e.g., newLocalBranch), and then push them to the upstream remote origin, thus creating a new remote branch, using git push -u origin newLocalBranch. Is there a ...
3
votes
1answer
55 views

Magit status section with recent checkouts / visited branches?

In the same fashion magit can offer the list of recent commits in a section of status buffer. I'd like to have a list of recent checkout/visited branches to be able to quickly switch to it (M-xbb). ...
0
votes
0answers
38 views

How to take line from recent commit with Magit

Use Magit to view the log with show diffs (-p). Inspect 4 commit old commit. Navigate to a few lines I've since deleted, but want back my project. I can mark the lines but cannot copy them, which ...
0
votes
0answers
21 views

Smerge: clearer refine mode?

I'm using doom+magit to deal with git, and I have smerge configured to change in-file conflicts. When I enable the smerge refine mode to highligh changes on a per-word basis, I find that refines works ...
0
votes
0answers
19 views

Smerge: auto-resolve LaTeX-like git conflicts

I'm using doom emacs + magit, and it enables smerge for me to display nicely my conflicts. I just saw that smerge has a function smerge-resolve to automatically resolve conflicts. I'd like to use it ...
1
vote
1answer
75 views

finding git conflict in the same buffer if cursor is at end of the buffer

I am using next-conflict to detect is there any git conflict, using following answer: Jump to next merge conflict in project using Magit and Smerge. I experience that if I am at the end of the file/...
1
vote
1answer
110 views

What's the difference between magit-branch-checkout and magit-branch-and-checkout?

If I'm on the commandline, and I'm in the master branch, and I want to create a new branch and immediately start working on it, I'd just do git checkout -b foo. So I'm looking for the magit equivalent ...
0
votes
0answers
355 views

Getting the TAB key to work the same in Doom as in Spacemacs

When using the TAB key in a magit status/overview buffer, it says: Buffer is read-only. If I manually disable read-only mode, the pressing TAB indents the text instead of expanding or contracting ...
0
votes
1answer
47 views

MAGIT: “precomposed unicode is not supported”

I am trying to commit in my Emacs folde, and I get this message below: "precomposed unicode is not supported". I have run on my Terminal "git config core.precomposeunicode false" ...
1
vote
1answer
153 views

How to checkout a specific commit using Magit?

When using M-x magit-checkout, I can only select a branch. Is it possible to visit a commit (the stage at the commit) using Magit? Thanks!
2
votes
1answer
296 views

How to use Magit to git log / git grep to find expressions across all previous commits

I am using Magit and was wondering how to revert to a specific commit that contained a specific expression. First I need to find the expression across all commits content. How to do this? In command ...
1
vote
0answers
25 views

APIs to create a custom issue list on Magit Forge?

Using Magit Forge, I'd like to organize a list of open issues by assignee. Ideally I'd like to display them in groups by assignee, but I'd settle for a single list if the assignee were added to the ...
0
votes
1answer
25 views

Bindings just for text buffers created by magit?

I'm trying to create a different keybinding to abort a commit in magit. Right now, when you're editing a commit message C-c C-k is bound to with-editor-cancel, which does the trick. But I'm an evil ...
0
votes
0answers
40 views

How to git stage a just-tangled file in `org-babel-post-tangle-hook`

I want to create a org-babel-post-tangle-hook that does a git stage buffer-file-name. There is a boring technical issue I have, which is that I don't know how to call magit-stage-file from elisp so ...
0
votes
0answers
21 views

Local magit revives all stale tramp connections

I'm using long-living emacs sessions using emacs in daemon mode, and I use tramp quite extensively. I usually have several buffers in the background which use tramp, but since my system has been ...
0
votes
0answers
8 views

How to remove all labels from a topic in forge

How can I remove all labels from an issue or PR in forge? When I trigger the edit-label minibuffer and clear its contents, then hit enter, the labels are not removed. I can see that forge is first ...
0
votes
0answers
30 views

Closing magit's visit-file/blob window doesn't return focus back to magit

If Magit's log is open and you hit RET on any of the commits, it opens a visit file/blob window where you can see the diff with some details. There's a few ways to do it, but I believe in Doom Emacs ...
2
votes
1answer
103 views

How to disable magit on remote files with tramp?

I'm working with Emacs on windows, I usually work locally, but I want to disable magit when I'm working on a remote file. I'm trying to add a hook that disables magit when it detects that the file is ...
0
votes
0answers
65 views

How to reset/undo changes in folder using Magit

I'm looking for a way to undo changes in selected directory, analogue of git checkout [folder-path] in Magit. I found that I can reset changes of specific file to selected branch by typing X f in ...
0
votes
1answer
34 views

Pull from git before applying org-capture?

I'm using org-capture to take project-specific notes by having a notes file in each of several git repositories. Looking forward, however, I can see danger here: if I'm working on project (1) and I ...
0
votes
1answer
42 views

Magit: rebase and push, basic questions

I was learning magit and found this screenshot at Command to visit Github pull request of current branch with Magit: I was wondering why we have Rebase and Push (and not just Push) at the top. What ...

1
2 3 4 5
13