Questions tagged [version-control]

The tag has no usage guidance.

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

Getting started with version control

I have read https://www.emacswiki.org/emacs/VersionControl https://www.emacswiki.org/emacs/RevisionControlSystem but I'm missing something... What is the starting point? What do I need to install, if ...
balanga's user avatar
  • 125
0 votes
1 answer
80 views

prevent symbolic link follow from git repo HOWTO

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
0 votes
1 answer
157 views

Magit aborts commit that runs with husky precommit hook but the commit works on the command line

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
  • 338
1 vote
0 answers
85 views

Potential reason why vc-annotate output is sometimes incomplete?

On Emacs 27.1 running on Linux, with Subversion backend, vc-annotate does not always annotate the complete file (seen on 3000-lines, 110KB text file). The vc-annotate-mode buffer holds the beginning ...
PRouleau's user avatar
  • 796
2 votes
1 answer
360 views

How to do a "git fetch --all --tags" in Magit?

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
1 vote
1 answer
263 views

What's the safest way to make documents on emacs?

I lost my progress on an org document twice, and I used tons of undo-redo commands, but none of them worked, so now, even though I really like org mode and emacs, I'm kind of disappointed. Is there a ...
Jesus Armando Peña Lucero's user avatar
2 votes
1 answer
418 views

Make Magit ignore certain files already added to git and to .gitignore

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
1 vote
0 answers
150 views

Magit ediff range in a pretty way?

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
2 votes
0 answers
156 views

How to version control newsrc, e.g. Gnus .newsrc.eld in git

BRIEF: like the title says, I want to know how best to version control newsrc files such as Gnus .newsrc.eld and possibly the legacy .newsrc By "version control" I mean something like git/...
Krazy Glew's user avatar
0 votes
1 answer
105 views

How can I fix vc-annotate colouring?

When I try to view the annotated text / code I can barely read it. Is there a way of changing the colouring or disabling it? See below.
zachaysan's user avatar
  • 111
1 vote
1 answer
97 views

How can I disable ***all*** VC/git awareness?

Even when I start Emacs without any initialization file, it is still aware of version control. (For example, if I visit a git-controlled file, the modeline will say something like "Git:some-...
kjo's user avatar
  • 3,227
3 votes
1 answer
74 views

RCS Version Control on Tramp Mode

Began using RCS Version Control within Emacs with no problem while locally, but having dificulty on Tramp mode, once it says: Debugger entered--Lisp error: (error "This file is already registered") ...
Waldemar22's user avatar
1 vote
0 answers
86 views

Linking source file in org mode with specific revision

I need org-mode version of links like this https://github.com/emacs-mirror/emacs/blob/cd2c1561636597c67edbf3daf10388e5385a93fc/etc/NEWS#L1119 for local files inside local repo. A way to specify not ...
JAre's user avatar
  • 185
2 votes
1 answer
439 views

Semantic linefeeds (one sentence per line) in Emacs

I'm trying to get Emacs to insert a line break at the end of each sentence as I type. (Why? Makes for easier version control of tex files.) Looking around I found a few places with some suggestions ...
apc's user avatar
  • 319
0 votes
1 answer
699 views

Find a version controlled project's root?

Trying to deduce a project root, using vc I'm getting errors, involving strange non-ASCII characters. I.e. invoking (vc-find-root (expand-file-name (buffer-file-name (get-buffer "fname")))) I get ...
Mark's user avatar
  • 113
1 vote
1 answer
303 views

Emacs vs subversion with passtype gpg-agent

I'm currently setting up a new Ubuntu box for myself at work. I generally have my work related stuff under subversion. The default method for subversion to store passwords in Ubuntu seems to be ...
daleif's user avatar
  • 121
1 vote
1 answer
96 views

How to detect programmatically if content under org-mode headline is encrypted or not before a save or commit?

org-mode allows users to encrypt the contents under a headline by adding the crypt tag with C-c C-q crypt and then calling M-x org-encrypt-entry. Below is an example using this feature: * Headline ...
Melioratus's user avatar
  • 4,634
3 votes
1 answer
83 views

How to execute a function in all files in the git working tree?

How to invoke a function on all files in the git working tree, while opening the ones which have had no opened buffers beforehand? A potential use case: Check and fix spelling in all project files ...
atevm's user avatar
  • 948
0 votes
1 answer
270 views

Track org-mode headlines separately with version control

I want to setup a personal wiki in Emacs org-mode. And I want to put this under version control, so that I can see the history of each article, as it evolves. If I use a single file for my wiki, with ...
Adam's user avatar
  • 1,897
7 votes
1 answer
995 views

Is there a way to revert only certain lines from a diff hunk?

I use the builtin VC package and it's very nice that when I do a diff of changes in the current file then I can revert any hunk in the diff quickly with C-a But sometimes I don't want to revert the ...
Tom's user avatar
  • 1,230
1 vote
1 answer
675 views

Managing source code annotations and version control

I would like to be able to annotate source code files with my own personal notes, strip these notes out before committing to version control, and merge changes back in from version control without ...
user234461's user avatar
5 votes
2 answers
961 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>...
salotz's user avatar
  • 1,380
1 vote
1 answer
518 views

Is there a way for ediff to compare SVN changes in the head to my local copy?

My company uses SVN, and one of the things I often want to do is compare the differences that someone else checked in without doing an update. For example, if I see someone has committed a new ...
LivingDust's user avatar
5 votes
1 answer
774 views

How do I stop Emacs micro-stuttering and high CPU utilization caused by background calls to git?

Using Emacs on Windows, I experiences issues due to background invocations of git.exe. The same issues might apply on Linux, though the more light-weight process calling might make them unnoticable. ...
kdb's user avatar
  • 1,561
3 votes
2 answers
371 views

VC status behavior in ibuffer-vc

I use ibuffer-vc, a replacement for list-buffer that displays the VC status of the listed files. I noted that the VC status stays as "edited" even after I push my changes. That is, the VC status does ...
falsum's user avatar
  • 145
0 votes
2 answers
128 views

Strategy for proper version control of "auto-filled" text files

I like auto-fill-mode a lot because it makes text fit into my screen even when I have two buffers side-by-side. My problem is that a small wording change may trigger auto-fill to reformat a whole ...
Daniel's user avatar
  • 3,633
3 votes
1 answer
163 views

Is there a way to add a new VC mode for a different tool?

I'm new to this forum and using VC in emacs so if this question has been answered or is just very basic, I apologize. At my employer we use a Version Control system that is not one of the systems ...
MBW's user avatar
  • 33
1 vote
0 answers
92 views

Is there a package to search in history of changes?

While editing files, time to time I regret deleting some redundant parts which afterwards become necessary. Let's say you are writing a letter and first you explained your thoughts with redundantly ...
Dummy's user avatar
  • 19
2 votes
2 answers
781 views

Is there a package for tracking local history of files like in IntelliJ or Eclipse?

Local History is a feature in IntelliJ and Eclipse, which for every file keeps a history of its changes: IntelliJ Local History Eclipse Local History It is not a replacement for revision control ...
Philipp Claßen's user avatar
0 votes
1 answer
531 views

Version control using emacs

I'm looking for a simple version control system. I'm the only programmer in my team and I would be the only one who is making changes to files. It gets complicated when the inputs change and I have ...
Prasanna's user avatar
  • 1,540
3 votes
1 answer
72 views

Version control: how to inhibit opening email buffer upon breaking lock

My work uses GNU RCS for our version control system, but I don't think the specific VCS is relevant here. (I know RCS isn't the most modern system but it suits our needs fine and has the advantage of ...
MTS's user avatar
  • 377
2 votes
2 answers
336 views

undo vc-annotate-revision-previous-to-line

When I've launched vc-annotate and then type a (vc-annotate-revision-previous-to-line), emacs will show me the revision before the one on the current line. From the docs: a Annotate the ...
mark's user avatar
  • 283
1 vote
0 answers
20 views

Customize vc-next-action to open a URL

Is there a way to customize vc-next-action C-x v v so that it opens a URL on success? I am using SVN and after each commit, I have to open manually a trac URL with the rev number. For example: http://...
roxas's user avatar
  • 11
3 votes
4 answers
670 views

Predicate function to test if file is under version control?

What is the predicate function to determine if a given file is under version control? (I'm using git.)
Dan's user avatar
  • 32.9k
4 votes
1 answer
330 views

Version control information out of sync with certain modes

Sometimes, though seemingly not in a consistent way, some modes that use version control information do not get updated correctly after git commands are run (e.g.,diff-hl-mode or git-gutter-mode ...
elethan's user avatar
  • 4,805
2 votes
2 answers
365 views

How to "svn revert <file>" with Emacs Version Control?

How can I do a svn revert <file> from Emacs Version Control? I've read many parts of the manual, but can't find it. I would like to do it over a file after opening it with vc-directory C-x v d, ...
nephewtom's user avatar
  • 2,261
3 votes
1 answer
627 views

Auto-indent without creating indentation in empty lines

Is there a way to use auto-indentation in Emacs without creating indentation on empty lines? For an example from C, if I have if (true) { printf("word"); } and then insert a newline after the ...
holocronweaver's user avatar
1 vote
1 answer
517 views

Org mode M-RET not working with new builds

Since the build of org mode of the end of august (now I use elpa/org-20150907), the M-RET does not start a new entry, and gives the error "Symbol's value as variable is void: org-planning-line-re". ...
yuggib's user avatar
  • 111
6 votes
1 answer
468 views

version control using the usual backup system of Emacs

This question is inspired by https://emacs.stackexchange.com/a/7831/ and the below settings borrowed from that answer : (setq backup-directory-alist '(("." . "~/emacs-backups")) version-control ...
Name's user avatar
  • 7,809
6 votes
1 answer
438 views

How to abbreviate version control information in the mode line?

Q: how can I abbreviate the version control information in the mode line? Buffers visiting a file under version control display branch information in the mode line as VCtype-branch. That's fine, but ...
Dan's user avatar
  • 32.9k
5 votes
2 answers
695 views

Anatomy of ~/.emacs.d [duplicate]

I'm brand-new to Emacs and I want to put my ~/.emacs.d under version control, much like I've done in the past with my vim setup. I installed a couple packages before initializing a git repo, and now I'...
ivan's user avatar
  • 1,938
3 votes
1 answer
421 views

Why does magit give so many "reverting buffer" messages?

I am still very much a beginner when it comes to version control, and am using magit. It seems like committing changes (frequently but not always?) triggers "reverting buffer" messages, one for ...
Brian Z's user avatar
  • 2,913
3 votes
1 answer
173 views

Get unique, permanant revision name in vc

I am writing some Elisp for a package. I was using vc-working-revision to identify the current revision. But it only returns the branch name, not the hash that name points to. Therefore, this ...
PythonNut's user avatar
  • 10.3k
0 votes
1 answer
95 views

Is there a way to customize 'vc-update'?

Currently, running vc-update in my Emacs runs git pull. Is there a way to customize it so that it runs something different like git pull --prune? Is it even advisable to do that?
Low Kian Seong's user avatar
28 votes
7 answers
3k views

Is there a simplified version control system appropriate for non-coders writing in Emacs?

I an academic and I love to do as much of my writing as possible in Emacs. A key thing that is missing for me is the ability to easily review the changes I have made to a text file over time. The ...
Brian Z's user avatar
  • 2,913
2 votes
2 answers
735 views

How to use ediff with (hg) changesets?

I have not found a good way to use ediff with Mercurial changsets. What I want is basically the functionality of vc-dir, but for committed changesets. The input should be a changeset identifier, and I ...
Meaningful Username's user avatar
36 votes
3 answers
8k views

Is there an Emacs mode which highlights differences from the committed version?

One feature that Xcode has which I think is pretty neat is a "Comparison" mode, which continually shows differences between the current buffer and the most recent commit. Is there anything like this ...
Ken's user avatar
  • 361
0 votes
1 answer
263 views

git-stage the current file-visiting buffer?

I've never really used vc but it looks like it only supports add or commit actions. I reckon magit must have some of the machinery to achieve this, but browsing its codebase didn't reveal anything ...
user1245317's user avatar
8 votes
2 answers
543 views

Why does my *vc-log* buffer start with "Summary:" in Emacs 24.4?

I just upgraded to Emacs 24.4 (from 24.3). Now, whenever I run vc-next-action on a modified file, the *vc-log* buffer that comes up starts with the word "Summary:" in log-edit-header face, followed ...
cjm's user avatar
  • 193
5 votes
1 answer
166 views

Insert and strip helpful comments from vc commit message buffer

When I run hg commit (or git commit, same difference...) from the command line without supplying a commit message it pops up an emacs buffer with the following contents: . . HG: Enter commit message. ...
TheCommitments's user avatar