No video

Sync your .dotfiles with git and GNU

  Рет қаралды 29,412

DevInsideYou

DevInsideYou

Күн бұрын

In this video we are going to see how easy it is to manage your .dotfiles with GNU Stow - a symlinking command line tool. We will also learn how to manage directory layouts of arbitrary complexity and how to use other people's .dotfiles as if they were themes.
GNU Stow:
www.gnu.org/software/stow/
Your unofficial guide to dotfiles on GitHub:
dotfiles.github.io/
My .dotfiles:
github.com/agilesteel/.dotfiles
This video is part of the following playlist:
• A fool with a tool is ...
Table of Contents
00:00 Introduction
01:04 Introduction to .dotfiles
09:52 Managing .dotfiles with stow
22:04 Advanced layouts
26:56 Restoring .dotfiles on a new computer
29:54 Using .dotfiles of other people like themes
32:47 Crafting your own .dotfiles
Website: devinsideyou.com
Patreon: patreon.devinsideyou.com
Discord: discord.devinsideyou.com
Telegram: telegram.devinsideyou.com
Twitter: twitter.devinsideyou.com
GitHub: github.devinsideyou.com
LBRY: lbry.devinsideyou.com
Install scripts: install.devinsideyou.com
Giter8 templates: g8.devinsideyou.com
Spotify concentration playlist: code.radio.devinsideyou.com
Cheers and Happy Coding!
#tutorial

Пікірлер: 107
@DevInsideYou
@DevInsideYou 4 жыл бұрын
Table of Contents 01:04 Introduction to .dotfiles 09:52 Managing .dotfiles with stow 22:04 Advanced layouts 26:56 Restoring .dotfiles on a new computer 29:54 Using .dotfiles of other people like themes 32:47 Crafting your own .dotfiles
@xalgiadotcom
@xalgiadotcom 3 жыл бұрын
Wow dude I love your videos they're so well made and informative you deserve more subscribers 🥰
@DevInsideYou
@DevInsideYou 3 жыл бұрын
Thank you for your kind words! 😘
@SantiYounger
@SantiYounger 4 жыл бұрын
Great tutorial, thanks for making this! I'll share a couple of notes of things I'll revisit, in case anyone else finds them useful 14:00 create folders and treat them as if they were the home directory. 15:29 stow -n (n stand for no) it is used to preview what it would do without actually doing it. 15:40 stow -v (v stands for verbose) 15:41 stow -S (S stands for stow) 15:44 stow -D for unstow for unlinking 16:00 target directory, in our case it's always home 16:10 stow t (t stands for target directory) 16:50 t ~ (means target directory) it's not usually taught since it's the default, but it's better to specify. 17:10 stow -vt ~ * (* stands for everything) 18:00 stow --adopt -nvt ~ * (running a test) since -n is still stating "no" 19:10 stow --adopt -vt ~ * 19:30 be careful with the --adopt flag, it's only needed at the beginning it's not needed later 20:00 showing how the original file becomes a symlink --------------- 23:16 stow -vDt ~ (insert directory) this would unlink the desired dot file,s yet it won't delete them. 24:05 stow has problems understanding slashes/for/paths 24:35 having 2 different directories. One for recording videos, one for normal use. 25:50 using ls -al in the terminal to see where symblinks are connected to. -------------- 27:00 simulating cloning dotfiles into new computer 30:00 testing someone elses dotfiles 30:05 guide to dotfile dotfiles.github.io 32:30 to test someone's dotfiles create a new directory, clone their repo and unlink the dotfiles you want to test and link it to theirs. 36:47 aliases for stow example
@FABESTAH
@FABESTAH Жыл бұрын
This is by far the best guide / tutorial about syncing dotfiles with stow out there. In all the other videos I watched they just briefly go over what stow actually does if at all and don't explain it nearly as good as you plus they don't show that many examples. So, thanks a lot for this video, now I finally understood everything I need to know about stow and can fully utilize it in my dotfiles repo! 😊👍
@traal
@traal 4 жыл бұрын
I just want to suggest using the "--dotfiles" option that is available since stow v2.3.0, which enables you to have much prettier filenames inside your git dotfiles repo. So you don't have to "ls -a" all of the time. 🙂
@DevInsideYou
@DevInsideYou 4 жыл бұрын
Oh that's cool. Thanks for letting everyone know!
@RichardBronosky
@RichardBronosky 3 жыл бұрын
@Fredrik Mellström I can find no reference to --dotfiles in the man page www.gnu.org/software/stow/manual/ However, it is mentioned in the release notes git.savannah.gnu.org/cgit/stow.git/tree/NEWS Thanks for the lead! The --dotfiles option combined with .stowrc should make things pretty easy to automate.
@ChrisCox-wv7oo
@ChrisCox-wv7oo 3 ай бұрын
I use the alias ll with options -lah (maybe others, not at computer now). It's nice. Didn't know about that flag though
@DV-ml4fm
@DV-ml4fm 2 ай бұрын
Best tutorial on stow ever!
@pur3D3votion
@pur3D3votion 4 жыл бұрын
What a great toturial, hanks for taking the time and sharing! Love that you brought up commonly used applications and didn't just create any random files. That way I was also able to learn more then just about the dotfiles.
@DevInsideYou
@DevInsideYou 4 жыл бұрын
Thank you!
@Hatraor
@Hatraor 7 ай бұрын
If you adjust the playback speed to 0.75, this is by far the best stow tutorial out there ! Thank you.
@FacundoTroitero
@FacundoTroitero 7 ай бұрын
great tutorial! I wish there was a Dev like You Inside Me!!
@davidbudzynski9290
@davidbudzynski9290 4 жыл бұрын
Thanks for the video. There are many other videos on this topic but after watching yours I finally understood how GNU stow works!
@DevInsideYou
@DevInsideYou 4 жыл бұрын
Glad you liked it!
@luxusAI
@luxusAI 4 жыл бұрын
very well explained.. I was starting today to create my own dotfiles.. it helped me a lot and learned some other small stuff!
@nebulousnomad
@nebulousnomad 3 жыл бұрын
Thank you so much!! I watched so many videos about stow but they all confused me and you explained everything clearly!
@tythedev9582
@tythedev9582 4 жыл бұрын
Perfect 👍. Just what I was looking for. This helped me immensely. Thank you!
@sheririchardson9245
@sheririchardson9245 4 жыл бұрын
Thank you for this. Got everything working without any issues.
@IgnoreMyChan
@IgnoreMyChan 4 жыл бұрын
_off-topic_ Lol, Sheri, because of the color of your earrings, I was confused and I had to go to your profile page to see what the heck they were. But at a decent resolution, they look great on you! :-)
@erectlocution
@erectlocution 3 жыл бұрын
I just came across stow a few days ago in a couple other videos, but this was the perfect presentation of information to help me grok the tool. Thank you.
@marcelodevops
@marcelodevops Жыл бұрын
Excellent video. I'm going to start my repo with dotfiles and use stow to experiment. Greetings from Brazil!!
@DevInsideYou
@DevInsideYou Жыл бұрын
I also live in Brazil these days :)
@IgnoreMyChan
@IgnoreMyChan 4 жыл бұрын
Thanks for this video! I'm now also kicking myself for not looking into this earlier...!
@BeALeaderAndAnInspir
@BeALeaderAndAnInspir 4 жыл бұрын
Subscribed. Thanks, mate. This video just blows my mind about what I can do with my dotfiles.
@cleanclothes
@cleanclothes 4 жыл бұрын
GREAT video full content and actual application. I learned a lot from this. Thank you very much!!!
@ivan6navi
@ivan6navi 4 жыл бұрын
Thanks dude, i was looking for this. I'm will try it.
@user-yn6ii7ys3u
@user-yn6ii7ys3u 3 жыл бұрын
Clean and precise tutorial, thank you!
@pershin-daniil
@pershin-daniil Жыл бұрын
The best tutorial I’ve watched on KZfaq! Thank you 🙏
@polcasacubertagil1967
@polcasacubertagil1967 4 жыл бұрын
This is gold! Thanks for the in depth look at this topic
@DevInsideYou
@DevInsideYou 4 жыл бұрын
Thank you for your kind words!
@zindev
@zindev 4 жыл бұрын
Good job! Very well explained.
@matheuscardoso1110
@matheuscardoso1110 4 жыл бұрын
really amazing video, congratz bro! will check your other videos now :)
@redumptious2544
@redumptious2544 3 жыл бұрын
Finally someone I do not need to speed up to watch efficiently 😄 Very nice video full of information 👍
@matti002
@matti002 2 жыл бұрын
the best video ever to learn stow !! keep it up man !!
@barakode414
@barakode414 2 жыл бұрын
This is the best resource for saving dotfiles. Thank you.
@auntiecarol
@auntiecarol 3 жыл бұрын
Still the best GNU Stow video on youtube. Subscribed.
@rahilarious
@rahilarious 4 жыл бұрын
Awesome guide. Thanks much
@AncientSocrates
@AncientSocrates 3 жыл бұрын
Very good tutorial. Great teaching skills. Excellent job man, really impressed with all your explanations, and little tricks.
@DevInsideYou
@DevInsideYou 3 жыл бұрын
Thank you for your kind words! Comments like these are very motivating!
@jasongomez5344
@jasongomez5344 4 жыл бұрын
Great video. After trying out the bare repository and alias method for a while, I am setting on this way, as it is cleaner than dealing with aliases and branches for different hosts.
@SantiYounger
@SantiYounger 4 жыл бұрын
I'm still learning about git, I set up the bare repository, and now I'm learning this way. What would you say is the biggest advantage of stow over bare repo? Thanks!
@jasongomez5344
@jasongomez5344 4 жыл бұрын
@@SantiYounger I didn't like using an alias (I suppose you could use a function to use the same command, but that makes things more complicated) and I think merging branches when you have different files for different gets difficult to manage. Also, some stuff I use didn't work with git in this way, like exa's git support (exa is an ls replacement).
@jasongomez5344
@jasongomez5344 4 жыл бұрын
@@SantiYounger This way is easier to deal with as you can have different 'packages' for different host types and the repository is completely normal. Only disadvantage is having to change directory into it.
@SantiYounger
@SantiYounger 4 жыл бұрын
@@jasongomez5344 got you! Thanks for the help, I'm setting it up right now, have a great day
@juliofruta
@juliofruta 3 жыл бұрын
Nice video! Thank you so much! 🤓
@monkgreensky2429
@monkgreensky2429 3 жыл бұрын
very informative and fast pace ❤️ love from Tehran❤️
@mjgritli
@mjgritli 3 жыл бұрын
Thank you very much, very helpful, I was making the links manually, hhh now stow takes control
@motif5775
@motif5775 3 жыл бұрын
Thank you!!
@xtnctr
@xtnctr 3 жыл бұрын
Huge tks, man
@verdipratama
@verdipratama 3 жыл бұрын
Thank youu sir 😍👌
@volodymyrpokropyvnyi7044
@volodymyrpokropyvnyi7044 4 жыл бұрын
Great tutorial man! Thank you! Ok? ;)
@RoadToFuture007
@RoadToFuture007 Жыл бұрын
3:28 I think it should be ls -al | grep ^\\. not ls -al | grep \\. Because the dot should be only at the begin of file names.
@alihammadshah
@alihammadshah 3 жыл бұрын
Once I unwittingly overwrote my init.nvim file and quit because of a faulty plugin. I knew at that moment that I fucked up and remember coming across config backup videos & repositories like this video and thinking to myself why didn't I take them seriously. I recommend everyone be a responsible dev and backup your shit. I had setup an undo dir fortunately and using 'strings path/to/undofile' could salvage all that was lost.
@LazyGeniusMan
@LazyGeniusMan 4 жыл бұрын
Very well explaination, it's covers things that others video/blog post don't cover. I have a question. So, if there are conflicts --adopt can be used and it will move the files in home dir to stow dir and symlink those files back to home dir, it's kinda replace files in stow dir with files in home dir right ?. Is there any way to replace files in home dir with files in stow dir instead? (reverse what --adopt do), it's useful if after installation or run it first time, the apps automatically create default config files and we want to replace it with the one in stow dir
@DevInsideYou
@DevInsideYou 4 жыл бұрын
Thank you for your kind words! Yes it would indeed be useful, but I don't think it can do that. I think it tries to only do destructive changes when it "owns" the files (technically symlinks). Cheers!
@florianhennig4778
@florianhennig4778 3 жыл бұрын
Thanks for the video, its very helpful. But now I wonder how I could automate the syncing of my dotfiles to a git repo automatically if they were changed on one of my machines (without doing git add, git commit, git push manually all the time)
@DevInsideYou
@DevInsideYou 3 жыл бұрын
Thank you! As a developer I assure you that there is always a way to hack sth together to make it happen. That said if you really want these things to happen automatically I'd recommend using a different (dropbox-like) synchronization solution. It's just a folder with text files at the end of the day. I usually use resilio sync for my synchronization needs but it's actually better suited for large files. Btw I don't recommend that you do this. If I were you I would want more control over what gets synced, but you do you :)
@axMf3qTI
@axMf3qTI 2 жыл бұрын
So what if the application downloads to the config directory, Like for instance the plugins for NVim. will they be put in the .dotfiles directory without a sym-link? Should I keep those outside the NVim directory?
@DevInsideYou
@DevInsideYou 2 жыл бұрын
You have many options. You can for instance gitignore them because on the other machine your nvim package manager will resync them so you don't need your dotfiles to keep them in sync on top of that. Another option is to move them outside of the config directory instead of gitignoring them because again your package manager will keep them in sync. A third option is to use git's submodules, so you will effectively have subrepositories in your dotfiles repository. I do this for my bat theme for example. Hope it helps :)
@axMf3qTI
@axMf3qTI 2 жыл бұрын
@@DevInsideYou Thanks it's still useful I moved to chezmoi tho. I liked using the dotfiles flag so my files aren't hidden but there is bug in stow, it doesn't work with the .config directory.
@pantasio
@pantasio 3 жыл бұрын
Greate tutorial, easy to understand. I wanna manament window app with stow: terminal setting.json, powershell profile, and many more window app setting .... how WSL2 can do that? waiting next tutorial.
@DevInsideYou
@DevInsideYou 3 жыл бұрын
Try github.com/twpayne/chezmoi
@pantasio
@pantasio 3 жыл бұрын
@@DevInsideYou thank you, nice tool, I try it later. after some research: window have "mklink" in cmd, it like create symlink in linux. So write a bat script to managment "mklink".
@cwkktt1903
@cwkktt1903 4 жыл бұрын
May i know how you switch screen(from terminal to vscode)? It seems very smoothly. Thanks.
@DevInsideYou
@DevInsideYou 4 жыл бұрын
Hey, I'm using a terminal called guake which appears/disappears when I press F12. It's a built-in feature. Here is the website guake-project.org/ and here is the video I made about it: kzfaq.info/get/bejne/ebWcqJCQyJ3Soqc.html Cheers :)
@cwkktt1903
@cwkktt1903 4 жыл бұрын
@@DevInsideYou Thanks very much~
@sebastiantillmann1669
@sebastiantillmann1669 3 жыл бұрын
Overall a great video. But WHY do you do the grep for file names? Try without | grep!
@DevInsideYou
@DevInsideYou 3 жыл бұрын
Thanks! I used grep because I wanted the dots to be highlighted, that's all. Cheers :)
@enisarik6002
@enisarik6002 3 жыл бұрын
How do we push those symlinked dotfiles into github? I tried pushing one, it does not have the content of source file, but rather have the directory in it. So stow does not help with management in github but only local.
@DevInsideYou
@DevInsideYou 3 жыл бұрын
You don't push the symlinks. You push the actual files. Once you pull them down on another machine you symlink them with stow.
@enisarik6002
@enisarik6002 3 жыл бұрын
@@DevInsideYou thanks for the reply. So it is still not possible to maintain dotfiles in GitHub with stow. I want to maintain them locally but also in GitHub repo at the same time. Stow only provides local maintenance. Am I missing something?
@DevInsideYou
@DevInsideYou 3 жыл бұрын
I feel like I am the one who is missing something :) Stow is a symlink manager. Git is a version control system. GitHub is a service that can host a copy of a git repository. So git+GitHub synchronizes the dotfiles between your computers and stow creates symlinks to those files on every computer. If you don't want versioning or if you find git or GitHub too coplicated you could replace the synchronization with sth more simple like dropbox, but you still need sth to create symlinks to the actual files, so you still need stow. I also have a full blown series on git, you might wanna check it out: kzfaq.info/sun/PLJGDHERh23x_4MDp0m4Arswm5VErr3tbl
@enisarik6002
@enisarik6002 3 жыл бұрын
@@DevInsideYou I think I understood it. Sorry that I am not 100 percent confident yet with the concepts :) If I place every config files in /dotfiles directory, then I use symlinks pointing to /dotfiles. Then, whenever I change symlink (or config file pointers), the dotfiles will change. And I can push those into github. I think I got it.
@keikenhate
@keikenhate 3 жыл бұрын
stow: ERROR: The stow directory D00M does not contain package README.md getting this at the first command, why that happens? I have the README.md in place
@DevInsideYou
@DevInsideYou 3 жыл бұрын
What's the "first command"?
@keikenhate
@keikenhate 3 жыл бұрын
@@DevInsideYou stow --adopt -nvt ~ * I bypassed it by deleting the README.md for now Lets see how will it go, nice tutorial btw!
@delta-a17
@delta-a17 3 жыл бұрын
How are you running a virtual machine as a virtual desktop instance on Windows 10?
@DevInsideYou
@DevInsideYou 3 жыл бұрын
The virtual machine is just in full screen mode that's all ;)
@delta-a17
@delta-a17 3 жыл бұрын
@@DevInsideYou Ah, full screen running on another virtual desktop, I see. Is that Virtual Box?
@DevInsideYou
@DevInsideYou 3 жыл бұрын
Yes it is, but these days I switched to WSL2 and I have videos about it kzfaq.info/sun/PLJGDHERh23x9_5rksXN2iHFA-8hF6YLZz
@delta-a17
@delta-a17 3 жыл бұрын
@@DevInsideYou Ah, thanks I'll check these out.
@never308
@never308 3 жыл бұрын
I used stow to create the file links but my dotfiles are not loaded. I have to go to ~ and execute source ./{filename} every time I open a new terminal. Any idea what is wrong?
@DevInsideYou
@DevInsideYou 3 жыл бұрын
Are your dotfiles online? Can I have a look? Also which file did you try to link?
@never308
@never308 3 жыл бұрын
​@@DevInsideYou drive.google.com/drive/folders/1S_JyoJxK76Xlnqm77EIumz8kN2ORc_jk?usp=sharing I installed some dependencies by running ``./install.sh script``, then I run ``stow -vSt ~ bash git zsh``. Only zsh is loaded when I open a new terminal nothing else. Thanks for the quick response.
@DevInsideYou
@DevInsideYou 3 жыл бұрын
Honestly it looks correct. You're running `stow -vSt ~ bash git zsh` from your `.dotfiles` directory right? I really don't know. It all looks fine. Feel free to join the discord server at discord.devinsideyou.com Maybe we could have a call and figure it out or sth.
@never308
@never308 3 жыл бұрын
@@DevInsideYou Yes, this is what I do. If I run `ls -al` I can see the file links. Ok, thank you for your time.
@oleholgerson3416
@oleholgerson3416 3 жыл бұрын
Whats the name of the shell theme?
@DevInsideYou
@DevInsideYou 3 жыл бұрын
I started with the space gray theme github.com/ionutvmi/spacegray-vscode base 16 ocean dark but when I switched from Sublime Text to vs code I started to like the color palette there so I mixed it with space gray. My .dotfiles are online github.com/agilesteel/.dotfiles/blob/master/guake/.config#L92 but essentially this is the palette that I'm using today: "foreground": "#c0c5ce", "background": "#2b303b", "black": "#4c4c4c", "red": "#ff3c3c", "green": "#0dbc79", "yellow": "#e5e510", "blue": "#3b8eea", "purple": "#bc3fbc", "cyan": "#11a8cd", "white": "#e5e5e5", "brightBlack": "#666666", "brightRed": "#f14c4c", "brightGreen": "#23d18b", "brightYellow": "#f5f543", "brightBlue": "#3b8eea", "brightPurple": "#d670d6", "brightCyan": "#29b8db", "brightWhite": "#e5e5e5", "selectionBackground": "#1c1f26" I configure everything to use it: all my editors and all my terminals. Cheers and happy coding! :)
@oleholgerson3416
@oleholgerson3416 3 жыл бұрын
@@DevInsideYou thanks. Ok, I see that you‘ve defined your prompt yourself. I thought you were using zsh with a plugin manager like oh my zsh.
@DevInsideYou
@DevInsideYou 3 жыл бұрын
Oh you were asking about the prompt. Yeah it's zsh with oh-my-zsh. The name is: intheloop. I adapted it slightly. I think I only made the @ symbol gray that's all. github.com/agilesteel/.dotfiles/tree/master/stow/zsh
@fearlessmangoose3118
@fearlessmangoose3118 4 жыл бұрын
Great video, thanks ! If you could speak slower it would be easier to follow, especially for non-native English speakers. I really appreciate the outline with time-links in the video description.
@DevInsideYou
@DevInsideYou 4 жыл бұрын
Thanks! It's not the first time I hear this. I'm trying...
@pauljamesharper
@pauljamesharper 4 жыл бұрын
You can slow the speed of the speech using the Settings> Playback. See this link. I'm a native English speaker and I need to slow it down too. But still a great video! www.cnet.com/how-to/how-to-watch-youtube-videos-in-slow-motion/
@Unixableful
@Unixableful 4 жыл бұрын
thank you. I think it'll be more helpfull when simplify the work flow and slow down a little bit :)
@systemofapwne
@systemofapwne 5 ай бұрын
I like the video a lot. But honestly, when you started to treat "work" and "record" in different folders "inside your dotfiles repository" everything inside me just screamed: "Use a dedicated git branch!".
@DevInsideYou
@DevInsideYou 5 ай бұрын
That's the beauty of stow. It's very flexible. If you want branches, go for it.
@bitcode_
@bitcode_ 4 жыл бұрын
thank you for the tutorial was helpful, if i could give constructive criticism, it was hard to follow, felt very random and had to re-watch many times to gather what i needed, but then again, i'm not too smart, so there's that.
@bitcode_
@bitcode_ 4 жыл бұрын
i'm here again to learn restore :)
@Whoknowsthatman
@Whoknowsthatman 3 жыл бұрын
A bit fast, but good work nonetheless.
@martinvandenbroek2532
@martinvandenbroek2532 6 ай бұрын
You are a good instructor but you would be a great instructor if you could slow down your pace of speech. 😉
@lalitkale
@lalitkale 3 жыл бұрын
You should slow down a bit when speaking.
@DevInsideYou
@DevInsideYou 3 жыл бұрын
I'm trying...
@lalitkale
@lalitkale 3 жыл бұрын
@@DevInsideYou appreciate your efforts. The content is good.
~/.dotfiles in 100 Seconds
13:54
Fireship
Рет қаралды 413 М.
Stop, Intel’s Already Dead!
13:47
Linus Tech Tips
Рет қаралды 179 М.
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45
Советы на всё лето 4 @postworkllc
00:23
История одного вокалиста
Рет қаралды 4,6 МЛН
Finger Heart - Fancy Refill (Inside Out Animation)
00:30
FASH
Рет қаралды 29 МЛН
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 92 МЛН
Manage Your Dotfiles Like A Superhero
25:39
Jake Wiesler
Рет қаралды 15 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1 МЛН
Getting Started With Git and GitLab
24:34
DistroTube
Рет қаралды 41 М.
~/.dotfiles 101: A Zero to Configuration Hero Blueprint
12:11
DevOps Toolbox
Рет қаралды 16 М.
How GitHub's Database Self-Destructed in 43 Seconds
12:04
Kevin Fang
Рет қаралды 968 М.
Microsoft Is KILLING Windows | ft. Steve @GamersNexus
19:19
Level1Techs
Рет қаралды 306 М.
Give Your Dotfiles a Home with GNU Stow
16:34
System Crafters
Рет қаралды 31 М.
Stow has forever changed the way I manage my dotfiles
8:09
Dreams of Autonomy
Рет қаралды 228 М.
Manage your dotfiles across multiple machines with GNU Stow and Git
12:27
Compilers, How They Work, And Writing Them From Scratch
23:53
Adam McDaniel
Рет қаралды 136 М.
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45