Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 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
39 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
39 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
14 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
24 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
11 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
12 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
42 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 ...
1
vote
1answer
58 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
50 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
33 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
18 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
18 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
72 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
62 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
188 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
40 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
109 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!
1
vote
1answer
160 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
22 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
24 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
30 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
18 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
26 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
87 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
44 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
26 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
36 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 ...
2
votes
1answer
72 views

Magit connecting to github with alternate ssh key

I have two github accounts – one personal and one for my job. In most of my repos, I use my work account and magit works fine. In a couple personal repos, I have this in .git/config: sshCommand = ssh -...
0
votes
2answers
43 views

magit: squash commits in feature branch, but ability to unravel later if needed

Does magit offer a way to squash a bunch of commits, but preserve some sort of record of the micro commits - should you need to step through them the next day.
1
vote
1answer
163 views

What means Unmerged into origin/master in magit?

In the magit buffer I see Unmerged into origin/master, yet I'm not noticing see any issues while merging with magit or with git on the commandline. Searching for the the subject brought me here[0], ...
1
vote
1answer
61 views

magit on Windows over plink tramp

I'm scratching my head on this problem, but I cannot seem to use magit on a project served over plink or plinkx on Windows. What does work: The windows client can use magit on a project stored ...
0
votes
1answer
52 views

Why magit use rectangle on origin/master and not only on master?

I have done a branch checkout on master but magit rectangle is on origin/master and not only on master.
0
votes
1answer
26 views

Can't create new branch

I clone git project. Current branch is main. Nice. Now I want to create new branch: my-branch Magit Branch Read Upstream First: Value Menu read upstream first I try this: magit-branch-create Create ...
0
votes
0answers
44 views

writing a magit function that specifies the repo

I would like to write helper functions in elisp for putting dotfiles under version control using YADM. From their documentation I learned that I could call up the magit status buffer for the YADM ...
0
votes
0answers
117 views

How to use authinfo credentials with Magit to push/pull to Overleaf

Overleaf allows git for some users. I have been using emacs and magit with overleaf since some time by providing username-password at each git push or git pull. What I want Now I want to configure ...
2
votes
0answers
68 views

How to deal with user arguments with magit transients?

I understand the infix flags work. However, I'm not sure how best to work with argument inputs. I have read the docs as well as looked at some examples from the magit source code but it's still a ...
2
votes
1answer
36 views

Context-aware username (e.g., git username instead of login name) in time-stamp

I am a total emacs/elisp newbie and I can't figure out how to do this. I have time-stamp-active t with a pretty standard format: time-stamp-format "Last modified %Y-%02m-%02d %02H:%02M:%02S ...
0
votes
1answer
44 views

Can Emacs be set to auto-stage (preferably with --intent-to-add) new files?

I often add a new file to a repo, make some other changes, then stage all, and commit all, forgetting that the new file is not yet tracked, so is not included in the stage all step. At least one ...
0
votes
1answer
24 views

Rebasing with -X option

This is my scenario: My branch is rebased against some other branch that other branch changed and I want to get mine back to sync I do a rebase and magit makes me go through all commits and merge In ...
0
votes
1answer
158 views

Deleting remote branches using Magit

I want to delete a remote branch. How can I do git push origin --delete my-branch in magit, to delete a remote branch?
1
vote
1answer
61 views

Initializing forge-alist

I am trying to initialize Magit Forge's forge-alist programatically. Therefore I put together my first couple of emacs-lisp code. It looks like the following: (let ((gitlab-install (lambda (host) (...
0
votes
1answer
78 views

Magit continues despite pre-commit hook failing

I have a pre-commit hook in git that returns nonzero on some "fatal" QA checks. When using git commit on the command line, git bails out. However, when trying the very same commit in Magit, ...
0
votes
1answer
41 views

How to apply a hunk of changes in diff to current branch?

I have two branches, let's say branch a and b, I would like to apply some changes from b to a. Note that I use magit-diff to show the differences between the two branches. Then I would like to apply ...
2
votes
1answer
126 views

How to keep magit from prompting me for my GitHub username

I'd like to configure magit so that it does not prompt me for my GitHub username when it needs to interact with GitHub in some way (like, say, when doing a push). My GitHub username is already in the ...
0
votes
1answer
53 views

Magit: cannot commit error, unsure why

I am getting the error below and I have no clue what could be causing this. Any help is greatly appreciated: 1 git --no-pager --literal-pathspecs -c core.preloadindex\=true -c log.showSignature\=...
0
votes
1answer
33 views

Force magit to ask for confirmation before deleting a branch

I would like to have magit ask for confirmation when I've told it to delete a particular branch. Currently it seems that magit considers the selection of a branch to delete to be the confirmation, as ...
0
votes
1answer
84 views

Magit git commit isn't working on spacemacs

After installing Magit in spacemacs. I used Helm to create a git repository. I added some files to stage then tried to commit. Let me know if I'm doing something wrong or it's just an issue. I get: ...
1
vote
1answer
109 views

How to create an annotated tag with an empty message in Magit?

Objective Create an annotated tag with an empty message, as would be created with the following command. $ git tag --annotate epic-tag --message="" Attempts Create it with M-x magit-tag<...

1
2 3 4 5
12