Git Bare Repository - A Better Way To Manage Dotfiles

Git Bare Repository - A Better Way To Manage Dotfiles

DistroTube

5 лет назад

129,812 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Shivam Kedia
Shivam Kedia - 28.10.2023 14:49

This seems like a great new thing to try out! However, I'm confused as to how one would go about setting up a new machine if they were to reuse the same dotfiles. Would they not have to do any moving / copying / symlinking?

Ответить
GR3Y'S 0RG4N1CS
GR3Y'S 0RG4N1CS - 21.08.2023 22:18

I prefer using the "ba-bam+bp" workflow for adding dotfiles, essentially instead of the alias being "config" I've set it to "b" for the git bare command in the video, "ba" for "(git bare) add" to add tracking to any new files, and "bam" for "(git bare) commit -am" then "bp" for "git Bare) push"

Ответить
Bib
Bib - 21.08.2023 09:29

how is this any different than having a git repository in your home directory? this whole thing just renames .git folder to dotfiles folder.

Ответить
Ray Jameson
Ray Jameson - 15.07.2023 08:19

so it's the same thing as making symlinks, it's just instead of symlinking every file, now you have to git add every file

Ответить
Pedro Alonso
Pedro Alonso - 14.06.2023 01:40

This has blown my mind, and was posted 4 years ago. Bruhh, how I don´t have seem that before

Ответить
Rancid Beef
Rancid Beef - 12.06.2023 06:01

Use "stow" to automagically symlink to your dotfiles directory.

Ответить
B4RB4 secondo canale
B4RB4 secondo canale - 04.06.2023 11:33

after having traced everything on your repository, if you change pc then you have to place each file by hand in the right place?

Ответить
Kazuto
Kazuto - 31.05.2023 17:11

I like this approach, but how would you handle scripts that install a set of applications? In a separate directory called e.g. `.setup`?

Ответить
James Ruscoe
James Ruscoe - 17.04.2023 21:13

How do you setup a bare repo with gitlab?

Ответить
Fred Waldow
Fred Waldow - 07.04.2023 19:55

hey DT
I love your videos and am using this method since you posted about it.
Is there a way to use the same bare repository, but use and update just specific files in different systems?
My use case: I use Arch Linux on my personal computer, but have a Macbook for work. So, I don't need all my dotfiles from my Arch config, but just some like `.vimrc`, `.zshrc` etc.

Ответить
Craig Olson
Craig Olson - 06.04.2023 05:30

an updated video for 2023 with fish shell, gitlab / github with 2fa requirements? things have changed in a couple of years. not so "plug and play" anymore

Ответить
twiksify
twiksify - 05.04.2023 00:57

This is brilliant! 🎉

Ответить
Astronomical 1997
Astronomical 1997 - 01.04.2023 15:08

Wow, this tutorial is very self-explanatory and very informational. Thank you sooo much! :)

Ответить
Qaz
Qaz - 24.03.2023 11:57

This is the most convenient method I've seen so far. Great video!

Ответить
M Shrinivas kamath
M Shrinivas kamath - 06.03.2023 23:05

How do I move my dotfiles to anothe machine and restore files ?

Ответить
Ryan
Ryan - 10.02.2023 04:41

My .vimrc file has become one of the most valuable and irreplaceable files on my computer and having a backup is essential.
I've have a really inefficient git backup setup currently, but this video is exactly what I've been looking for for months.
Excited to implement it.
Especially now that I started using linux and I'm creating even more valuable/ irreplaceable dot files.

Ответить
LittleBird
LittleBird - 12.12.2022 13:22

Why can't we just "git" the entire .config folder ? Wouldn't that be a simpler way. My .config folder /repo is about 250 mb. Granted you make have to symlink a few files like .bashrc which reside outside of .config but the majority of files sit inside .config.

Ответить
espehon
espehon - 07.12.2022 05:09

For those on Windows, setting an alias might not work. I found you can instead make a custom function like the following:
function config {
git --git-dir=$HOME/dotfiles --work-tree=$HOME $args
}

Ответить
k' mui
k' mui - 05.11.2022 00:32

instead of setting showUntrackedFiles to no i keep it normal and instead filter with an .gitignore file. So i automatically track files in specific subdirectories

Ответить
dw
dw - 04.11.2022 01:43

The only problem with this method is that it's a pain to diff changes. I switched to using yadm. Basically the same but with the benefit of diffing plus a few extra features.

Ответить