Skip to main content

Questions tagged [git]

is for Emacs support of Git, the distributed version control system. Emacs `version-control` feature supports many systems besides Git. Additional extensions, such as `Magit`, also provide extensive Git support. Therefore use additional tags besides `git` for Git related questions.

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

I occasionally write Git commits for a project that requires all commits to carry a Signed-off-by trailer, to signal compliance with the Developer Certificate of Origin. I frequently forget to add ...
mavit's user avatar
  • 231
0 votes
1 answer
66 views

Is there a way to mark files to stage with magit? I want to pick only specific changes to be staged all at once, so that when I finally run magit-stage-file, all those marked changes get staged ...
Temax's user avatar
  • 1
0 votes
0 answers
68 views

Given: Emacs 28.1 Windows 11 git version 2.47.1.windows.1 Here my init.el ;; https://github.com/Malabarba/smart-mode-line (use-package smart-mode-line :ensure t :config ;;(setq sml/theme 'light) ...
a_subscriber's user avatar
  • 4,386
2 votes
1 answer
177 views

I am interacting with git via a set of zsh functions/aliases I've grown over the years, so I don't typically need magit. In fact, I only have magit installed to provide syntax highlight for when git ...
Hi-Angel's user avatar
  • 1,292
0 votes
2 answers
64 views

I would like my Magit status buffer to display a diffstat of recent changes at the bottom. Ideally, this would be like the diffstat shown by git pull when the merge.stat option is true—a diffstat ...
Michael Hoffman's user avatar
1 vote
1 answer
124 views

I want to use ediff as difftool for git. I copied the configuration for git from here: [difftool.ediff] cmd = emacs -Q --eval \"(ediff-files \\\"$LOCAL\\\" \\\"$REMOTE\\\")...
Tietan's user avatar
  • 180
0 votes
0 answers
86 views

I am using vc-dir for simple git tasks and I am happy with it but for the moment I still need to push outside of emacs and I would like to fix this. When I push (C-x v P), I get the following error: ...
R-addict's user avatar
0 votes
1 answer
129 views

I have recently switched from launching Emacs from the terminal (i.e. emacs --init-directory "path/to/my/init") to launching it from a universal keybinding (i.e. super-e). This has had the ...
lmkerbey's user avatar
0 votes
1 answer
58 views

I sometimes want to look at the last version of a deleted file. Normally for a file that still exists in the repo, I cant do Ctrl+x v ~ (bound to vc-revision-other-window). But that has no mechanism ...
suvayu's user avatar
  • 1,678
1 vote
1 answer
83 views

In the manual pages about version control I find the instructions on how to create and switch to branches, also for Git repositories. But I can't find information on how to delete a branch – both ...
pglpm's user avatar
  • 397
0 votes
1 answer
164 views

In Magit it is easy to see what difference a local file has compared to its checked-in version (HEAD). However once I received changes from others (via magit-pull), I would like to see what changes ...
halloleo's user avatar
  • 1,445
0 votes
1 answer
89 views

I sometimes want to unstage changes. From the console I can use git reset or git reset <file>. I couldn't find anything related in the docs or via C-x v C-h for vc, but it seems that this should ...
jonas's user avatar
  • 102
0 votes
1 answer
91 views

Version Details: Emacs 28.2 On Debian 12 Steps to reproduce: I am editing Groovy files in a Git workspace. When I load the files they come up as fundamental so I switch to java-mode. All works as ...
Tony Cooper's user avatar
4 votes
1 answer
372 views

When merging conflicts In smerge mode, how to select "mine" for all conflicts? At the moment I only know how to do it one by one with smerge-use-lower or C-c ^ l. Update: a possible solution ...
qazwsx's user avatar
  • 631
3 votes
2 answers
108 views

Emacs has a beautiful feature: in the *vc-diff* buffer (generated by vc-diff either by C-x v = in a file buffer or by = in a *vc-dir* buffer), kill unwanted hunks with k (i.e., diff-hunk-kill) and ...
sds's user avatar
  • 6,304
0 votes
1 answer
137 views

There is any command/package that allows me to move back and forth through the vc history of a file, updating the buffer to display the previous/next revision of that file? Let's say I have a file ...
Math's user avatar
  • 103
0 votes
1 answer
61 views

I implemented the following to git commit after a file is saved. It works, I think, but the commit message, rather than being empty, is the literal value ''. This is the case whether or not I have any ...
user2567544's user avatar
0 votes
1 answer
121 views

I 've been using git specific commands from helm (I think it internally uses vc-git-grep I find xref-find-definitions work very well. and wonder how xref-find-apropos compare with vc-git-grep I coulnd'...
eugene's user avatar
  • 539
3 votes
2 answers
463 views

Emacs 29.1 introduced new functions to install packages directly from source. Configuring it to download from the latest commit works fine, but I can't find how to download from a specific commit ...
Balto's user avatar
  • 31
0 votes
1 answer
324 views

I have git repo here: ~/git/myrepo/ then I do: ln -s ~/external_dir ~/git/myrepo emacs follows symbolic link when opening the file: ~/git/myrepo/external_dir/somefile.txt I'd like to prevent it, ...
vibrys's user avatar
  • 21
1 vote
1 answer
466 views

I need to select some files or hunks in one file in existing stash entry using Magit, and then apply or pop them. How can that be done? The git command for a file (with 0 replaced by the relevant ...
OpenITeX's user avatar
  • 111
0 votes
1 answer
87 views

Initially I opened Lags when navigating vc-root-diff buffer and the cause of slowness was Emacs opening referenced files by diff. Back then I used Emacs 27.1. Now I'm on Emacs 28.2 and previous ...
gavenkoa's user avatar
  • 3,582
0 votes
1 answer
25 views

More than a year ago I cloned Emacs: git clone git://git.savannah.gnu.org/emacs.git and since always kept it on date with git fetch git://git.savannah.gnu.org/emacs.git Well, at least I thought that ...
Keks Dose's user avatar
  • 538
2 votes
1 answer
145 views

I use git-gutter to keep track of git changes in my buffer while editing. I created this hydra to speed up commits a bit more (when I don't feel like using magit - often because this "takes me ...
Att Righ's user avatar
  • 837
0 votes
2 answers
3k views

I am currently using vim editor on Git Bash terminal running in a Windows machine, but I want to switch over to Emacs editor. It is returning bash: emacs: command not found . Do I need to install the ...
Amah N. Lofty's user avatar
8 votes
1 answer
2k views

Full error (on the bottom line): Error (doom-first-file-hook): Error running hook "global-git-commit-mode" because: (void-variable transient-base-map) Hello! I'm running this on an M1 chip ...
Krys's user avatar
  • 105
0 votes
0 answers
36 views

I'm using emacsclient. When I use git glog or git rebase -i in a shell within my emacs session, I see output that expects me to be able to scroll (and to exit with :q). I cannot exit this buffer, ...
Mittenchops's user avatar
1 vote
1 answer
781 views

Suppose someone (not me) submitted a Pull Request on GitHub. Locally, I would like to run that work. Hence, I need to have the code locally. Following this documentation, I can achieve that in the ...
Pedro Delfino's user avatar
0 votes
1 answer
349 views

I'm a bit a bit stumped by an annoying problem that I'm having with magit. I'm working in a monorepo (lerna) repository that uses husky to run a precommit hook. The hook runs on packages that have ...
fraxture's user avatar
  • 367
0 votes
1 answer
52 views

I try to run crux-delete-file-and-buffer, but it gives me: vc-delete-file: Please commit or undo your changes before deleting Why can't it just delete it?;)
Jason Hunter's user avatar
  • 1,236
0 votes
1 answer
45 views

I have attributed a tag called origin/v0.4.9 for a specific commit on a GitHub Pull Request. I thought the PR was simple, stable, and "a certainty" to be merged really fast. I was wrong. I ...
Pedro Delfino's user avatar
1 vote
1 answer
66 views

Suppose a merge conflict happens. There are two options shown the upper (in red) and the lower (in green): I would like to avoid complex ediff-mode stuff to pick one. I have seen some tutorial where ...
Pedro Delfino's user avatar
0 votes
1 answer
318 views

I am working on a feature via Pull Request. While I was working, main branch evolved. Now, I want to put my changes on the Pull Request on top of latest main branch. This means I want to rebase. Hence,...
Pedro Delfino's user avatar
0 votes
1 answer
76 views

Is it possible to change the name of Gnus' newsrc.eld? My use-case is that I want to use the same Emacs setup on various machines, which are either work machines or private machines. The Gnus ...
loris's user avatar
  • 325
0 votes
0 answers
52 views

I have emacs 28.1 on my phone in F-Droid. When I start any org-agenda population command like org-agenda-list or org-agenda-list-stuck-projects the list shows up, but also shows up this error message ...
Evgeny Mikhaylov's user avatar
0 votes
1 answer
57 views

I have a repository under version control and I am using Magit as an interface to git. I can see one unstaged change in a file after executing magit-status (C-x g). This means the file was changed and ...
Pedro Delfino's user avatar
0 votes
0 answers
48 views

Currently there is an issue (or else I can't figure it out) with counsel-git-grep-function: why does this function not ignore the files in .gitignore when searching? It would be a useful function if ...
Adelita's user avatar
  • 255
4 votes
1 answer
1k views

I would like to pull changes from an upstream repository. More specifically, I would like to pull all the tags that were introduced. On the terminal, I can do: $ git fetch --all --tags On Magit, ...
Pedro Delfino's user avatar
2 votes
1 answer
287 views

On the terminal, in a repository with unstaged changes, I can do: ~/projects/introduction-to-clojure$ git checkout -f 3.7 Branch '3.7' set up to track remote branch '3.7' from 'origin'. Switched to a ...
Pedro Delfino's user avatar
0 votes
1 answer
76 views

I keep my emacs init file under version control. See the GitHub. I have the things installed from ELPA also unver version control. Which is annoying. After executing Magit status, I have: Head: ...
Pedro Delfino's user avatar
2 votes
1 answer
809 views

This question is related to this previous question. These two files below are under version control which causes some inconvenience in magit-status: Unstaged changes (2) modified .emacs.d/projectile-...
Pedro Delfino's user avatar
6 votes
1 answer
3k views

I am trying to use the Fixup feature on Magit. I will list a recipe to what it is happening: (i) - I have a project under version control. (ii) - My first commit is: 1f61d09 * first commit: add file ...
Pedro Delfino's user avatar
0 votes
1 answer
178 views

I have configured git to use emacs as editor for writing commit messages (with (start-server) in my init.el). I now want to put a template message (e.g. Bug #1234:) on top of the commit message buffer ...
Student's user avatar
  • 103
1 vote
0 answers
190 views

I need to investigate a project, with a patch made by a former student of my university. He made a series of commits on a repo, and I need to see what additions he made. I got the list of files ...
Alessandro Bertulli's user avatar
3 votes
1 answer
1k views

Honestly, I have always picked both and it has worked out so far. But I do not know in which concrete cases it would be better to pick one over the other. It would be good to see examples. I tried ...
Pedro Delfino's user avatar
2 votes
1 answer
254 views

I have been tweaking my config file (init.el). This file is inside a .emacs.d directory which is under version control by Git. I also use Magit a lot. After editing my config, I was going to stage, ...
Pedro Delfino's user avatar
4 votes
1 answer
646 views

Suppose I am in a folder called local-projects. Using the terminal, I can do: [pedro@system:~/quicklisp/local-projects]$ pwd /home/pedro/quicklisp/local-projects An important information to ...
Pedro Delfino's user avatar
0 votes
1 answer
242 views

I have a branch that I have been working on. At the same time, master branch was evolving. I decided to put my local branch changes on top of master new changes. Thus, after pulling changes on master, ...
Pedro Delfino's user avatar
2 votes
2 answers
1k views

I accidentally inserted 1 commit in my local master branch. I have not pushed this changed and I want to remove it. This was supposed to be in a new branch. So, I created a new branch based on master ...
Pedro Delfino's user avatar
1 vote
0 answers
133 views

Every time I visit a buffer containing characters such as 'ç' 'á' 'ã' or 'é', emacs throws out this error: These default coding systems were tried to encode text in the buffer ‘ *temp file*’: (utf-8-...
Luctins's user avatar
  • 130

1
2 3 4 5 6