Manage your dotfiles across multiple machines with GNU Stow and Git
HTML-код
- Опубликовано: 13 сен 2024
- SUPPORT THE CHANNEL
💳 Patreon: / chrisatmachine
💰 Paypal: paypal.me/chri...
👕 Merch: shop.spreadshi...
SOCIAL MEDIA
🕸️ Website: www.chrisatmac...
🐦 Twitter: / chrisatmachine
💻 Github: github.com/Chr...
📺 Odysee: odysee.com/$/i...
💬 Matrix: matrix.to/#/+a...
📡 Twitch: / chrisatmachine
🔌 Discord: / discord
₿ DONATE CRYPTO
Bitcoin: bc1qlw9t04evwvvlgkwkxf3cm9mfk6zgmy09sp4uja
Ethereum: 0x31202eF4Ce3d03c1B5111Bc388f937e7b17dd164
Litecoin: ltc1qmhxvmr9h3hpc226aeqj9sadwjn3gl0nh5qsvkf
Polkadot: 12pxctmVV3HBKqfpnPbgqznKHdpFbihVENH2VJU6Z5HsaD1S
Chainlink: 0x31202eF4Ce3d03c1B5111Bc388f937e7b17dd164
Bitcoin Cash: qqz56dl270wx04z4x8y42aft39ptpksjuggmel0hz6
XRP: raUaxdWMst1Eb96nACTvJTRWgtmsRQpwHk
Stellar: GD7PCULOCC4DLRJN6TJSWFTETDWL4D6URHXEBFX4B4RJQN4B5T7XZ5AU
Great trick. much better than bare git repo.
Just one thing. stow doesn't assume HOME ( ~) directory as the target directory ( by default it is the parent of the current directory ), can be changed with --target flag.
eg: dotfiles in ~/Documents/dotrcs ( and this is my pwd )
stow neovim # would symlink things relative to ~/Documents.
stow --target=${HOME} neovim # will symlink relative to HOME (~).
this trick is older than the bare git repo & the bare git repo was made because this trick isn't sufficient for a lot of things, bgr is superior and more flexible.
@@laughingvampire7555can you elaborate, in what ways bgr is better?
I've watched half a dozen videos on GNO Stow and you're the first to actually give a good explanation of the symlink behavior. Things finally make sense now.
Thank you for the folder explanation. I didn't really find that anywhere else and the statement "pretend you are in your home directory (parent)" made me understand how stow operates. Thank you again.
I just asked this last stream. Awsome video. Thank you
Really great tutorial. Just moved my entire config over to stow.
Did you hear about the git bare repo strategy to manage dot files? Any advantage or disadvantage over stow?
I just put a couple days into this same exact setup before you uploaded this. great explanation as always - not a lot of good videos on stow for storing dotfiles alone, thought I was dumb for getting confused over such a simple tool
Yea stow is a game changer! If you didn't know about it I couldn't vouch for it more! Love your vids mate!
Late but thank you for teaching me about stow! Never heard of it before, love it now.
Nice and clear explanation. Thanks, Chris!
I'm surprised I've never ever heard of GNU stow before. Now that I'm looking, it's available nearly everywhere - it's even in the cygwin repo! How have I never heard of GNU stow before?! I'm baffled!
Cool viddy! Going to try it out now
I was going to say "why don't you use just one directory" and them you explained the "a la carte" pick and it made total sense. Also, I'm glad I've read the pinned comment before trying anything :D
keep up the good work
Amazing video! Thank you!
Thanks for making the video! Perhaps you could please clarify something? From my understanding most dotfiles expect to sit in the home directory. You're now moving them (or the symlinks to be accurate) into subdirectories. Won't the programs, zsh for instance, look into for ~/.zshrc and not ~/zsh/.config for the .zshrc file?
btw you can set an alias of ls = ls -lah, it will directly tell more info about the file, including the hidden one & also show if it is a symlink or not
Thank you manito.
your content is excellent
Love your tutorials!
amazing. Thanks for sharing this.
I tried replicating this but noticed that the stow command also symlinks the files from the .git directory. Is there a way to prevent this from happening?
I didn't know about these things. I do use a git repo as well. I came up with a solution where every file in the repo contains a special header on where it has to go. At the root of the repo I have a shell script that goes through all the files in the repo and extracts that header and symlinks the file to its destination. Also had its own '.ignore' file for excluding stuff I didn't want. It didn't work on some installs because I used awk to parse the header and awk code has been inconsistent across different versions on different systems.
Will look into stow.
I just create symlinks for all directories or files to their appropriate positions and that does everything
You dont stow nvim config ?
Very good video. Being that stow is a linux command, I had to do a `man stow` which lead to the initial use for the software in the info pages. The use case was to keep software separated in case you had to remove software. To remove software, all you had to do was remove the stow directory. Your video seems to be missing the options for dot-files. There may be an issue with dot-files according with @hulio in the comments section. All said and done, I am looking forward in using this strategy in the future.
My repo isn't cloned to my home folder so tried to figure out why until I tried `stow -t $HOME */`...
I don't like the way I've to manage my directory tree to use Stow. That's why I've got my own deploy script. It's very minimal and suckless (just under 60 lines) and it can symlink all the files i specify and also make install from git repos. I've to make few changes, then I'll release it for public use. Give it a try!
Any updates?
/Popcorn-time 😏😏😏
What's the advantages of using stow compared to just clone the dot files repo and create the links? Should be faster. If it needs to create link for all the folders it's like one line command.
I was thinking the same thing
I think the advantages is in the options of the program which the video does not go into.
Is there a way to make stow copy and not symlink? So that then I can delete the repo from my home and the files don't appear like .zshrc -> Dotfiles/zsh/.zshrc ???
This defeats some of the point. What if you add a cool new function to zsh? Don't you want that available to any machine you pull configuration on?
What terminal emulator are you using here?
Mmmh ... I just use good old plain Git for that. Since I use Git anyways for other things I just use it for (some) of my dotfiles, too.
Do after 5 hours of trying to solve a locale error on stow i just give up. is your old setup without optimizing things(stow+git) somewhere?
Bro what happened to the video resolution?
takes a minute for youtube to publish it in higher res
why don't just ln -s ?
This would have made my life so much easier 🫠 when I decided to try out window managers last week and just get this video today on a random popup from RUclips .
Thanks though when I again decide to try out window managers ☺️.
fuck yeah
Sorry but I didn't see anything in this video, even installing and configuring stow.
.stow-local-ignore doesn’t seem to work
Please also make video using bare method also
Did they fix the dot- prefix, --dotfiles option?
What issues are you finding with it. I have version 2.3.1
@@michaelphillips8952 it seems that they didn't fix it
aspiers/stow/issues/33
✔️ how it works?
❌ why you might want to do it?
Why not just `cd ~; git init`?
Why Stow and not YADM?
Use chezmoi instead, your root will thank you.
Bro I have some problem
If I open two or three terminal when I switch between some terminal become dark ? Sorry for my bad English
All this yelling.
He teaches like Mr P Solver by yelling you to learn it.
Why all this pretending directories?
I don't understand why he wants to pretend. Just teach it right.
Don't pretend to be here or there. It confuses your students.
He asked us if we knew he used fontconfig at work on his Apple machine, saying, "Right?"
How would we know? Don't ask us if it's right or not.
He was nervous and didn't explain it well. He needs to stop being fast Mr alpha male with so many opinions and just organize, relax, and take it easy.
Who cares if Apple didn't make the operating system with the features you think it should have. That's your opinion. That company is making the products it wants to make, and it most likely has very good reasons for taking the paths it does even if this man disagrees.
Ease the words and be more polite towards others and you won't come across so brash, opinionated, crass, and impatient.
Just words to help. I know the words are harsh, but most people don't like a loud opinionated person in public. If you disagree, it's fine.
Why do I need to watch 12 minutes video about something that can be said in 3 words 😭? It creates symlink!
Because this video explains a use case beyond "It creates symlink".