Questions tagged [magit]

is an Emacs extension for the Git version control system.

Filter by
Sorted by
Tagged with
0
votes
0answers
28 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 ...
0
votes
1answer
38 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 ...
2
votes
1answer
36 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
24 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
14 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
14 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
52 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
38 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
53 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
37 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
65 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
66 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
19 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
20 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
17 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
7 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
25 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
76 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
33 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
25 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
34 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
50 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
36 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
84 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
39 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
37 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
23 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
36 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
73 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
52 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
35 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
41 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
22 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
151 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
49 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
66 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
37 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 ...
1
vote
1answer
92 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
44 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
26 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
68 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
84 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<...
0
votes
0answers
35 views

magit, understand magit-blame

When I enter magit-blame it shows the following lines. jihae 2020-04-07 14:51 불필요한 파일 삭제, yarn 빠진 부분 추가, public path Eugene Kim 2020-06-04 17:50 config process.env.__DEV__ = ...
3
votes
1answer
68 views

Is there a way to see a pull-request review status in magit?

I see I can view the github pull requests assigned to me with forge-list-requested-reviews. Is there a way to see the status of each review? For example I've approved some of the pull requests that ...
1
vote
1answer
38 views

How to set smerge-command-prefix to “\C-cv”

I find the default prefix for smerge-mode C-c^ and I have following setup: (setq smerge-command-prefix "\C-cv") (setq smerge-command-prefix "\C-c\C-v") Also C-c ^ runs the command ...
0
votes
1answer
37 views

Git commit multiple files

When I go to commit my changes VC seems only allows me to commit one file at a time via C-x v v. Is there a way for VC to commit more than 1 file at a time?
1
vote
2answers
60 views

How can I create a new label using Magit forge?

Using Magit Forge, I'd like to create a new label for a new issue. I can edit the Labels field using command forge-edit-topic-labels, but that command accepts only labels that already exist. How can ...
0
votes
1answer
129 views

Syntax highlighting for comments in Magit commit buffers with custom core.commentChar

I frequently source the body of my GitHub PRs from my commits, and thus is makes sense to consider my commits to be made in Markdown (it is nice to have a markup language for commits anyway). Thus I ...
0
votes
1answer
71 views

Unable to push into Github using Magit

When I try to push into my remote repository, the mini buffer says Running git push -v origin master:refs/heads/master but nothing else happens. Following the manual, I have staged, committed, and ...

1
2 3 4 5
12