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

Комментарии • 59

  • @abhishekbanerji1451
    @abhishekbanerji1451 3 года назад +78

    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 (~).

    • @laughingvampire7555
      @laughingvampire7555 Год назад

      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.

    • @asg8813
      @asg8813 10 месяцев назад +2

      ​​@@laughingvampire7555can you elaborate, in what ways bgr is better?

  • @andrewklaudt8080
    @andrewklaudt8080 8 месяцев назад +1

    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.

  • @kyle8575
    @kyle8575 9 месяцев назад +1

    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.

  • @mathalphabet5645
    @mathalphabet5645 3 года назад +4

    I just asked this last stream. Awsome video. Thank you

  • @ethanholz3733
    @ethanholz3733 3 года назад +4

    Really great tutorial. Just moved my entire config over to stow.

  • @matthias2447
    @matthias2447 3 года назад +16

    Did you hear about the git bare repo strategy to manage dot files? Any advantage or disadvantage over stow?

  • @will2r
    @will2r 3 года назад +7

    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

  • @Dizzle0318
    @Dizzle0318 3 года назад +5

    Yea stow is a game changer! If you didn't know about it I couldn't vouch for it more! Love your vids mate!

  • @fredrik354
    @fredrik354 Год назад +1

    Late but thank you for teaching me about stow! Never heard of it before, love it now.

  • @TheRoseWoodBody
    @TheRoseWoodBody Год назад +1

    Nice and clear explanation. Thanks, Chris!

  • @kriskropd
    @kriskropd 3 года назад +3

    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!

  • @kikleine
    @kikleine 3 года назад +2

    Cool viddy! Going to try it out now

  • @brunofunnie
    @brunofunnie Год назад +1

    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

  • @Kindafkglad
    @Kindafkglad 3 года назад +2

    keep up the good work

  • @rubempacelli6815
    @rubempacelli6815 2 года назад

    Amazing video! Thank you!

  • @johnnyidahoan4182
    @johnnyidahoan4182 6 месяцев назад

    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?

  • @anantgupta1188
    @anantgupta1188 3 года назад

    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

  • @alonso0188
    @alonso0188 10 месяцев назад

    Thank you manito.

  • @jacobtb1
    @jacobtb1 Год назад

    your content is excellent

  • @alienmo6653
    @alienmo6653 2 года назад

    Love your tutorials!

  • @agentzhao
    @agentzhao 2 года назад

    amazing. Thanks for sharing this.

  • @piotrszponder123
    @piotrszponder123 9 месяцев назад +1

    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?

  • @peacemekka
    @peacemekka Год назад

    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.

  • @sohamchatterjee750
    @sohamchatterjee750 2 года назад

    I just create symlinks for all directories or files to their appropriate positions and that does everything

  • @harishgontu9285
    @harishgontu9285 3 года назад +3

    You dont stow nvim config ?

  • @michaelphillips8952
    @michaelphillips8952 Год назад

    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.

  • @erikreider
    @erikreider 3 года назад +2

    My repo isn't cloned to my home folder so tried to figure out why until I tried `stow -t $HOME */`...

  • @jitessh
    @jitessh 3 года назад +6

    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!

  • @manapotion1594
    @manapotion1594 3 года назад +2

    /Popcorn-time 😏😏😏

  • @JazzMachine77
    @JazzMachine77 3 года назад +2

    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.

    • @robertjmccabe
      @robertjmccabe 2 года назад

      I was thinking the same thing

    • @michaelphillips8952
      @michaelphillips8952 Год назад

      I think the advantages is in the options of the program which the video does not go into.

  • @santiagogonzalez6338
    @santiagogonzalez6338 3 года назад +2

    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 ???

    • @kagebun287
      @kagebun287 2 года назад

      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?

  • @autocratdaddyjones
    @autocratdaddyjones 11 месяцев назад

    What terminal emulator are you using here?

  • @Linuxdirk
    @Linuxdirk Год назад

    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.

  • @Holzf43ller
    @Holzf43ller Год назад

    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?

  • @smutnywalen
    @smutnywalen 3 года назад +1

    Bro what happened to the video resolution?

    • @chrisatmachine
      @chrisatmachine  3 года назад +4

      takes a minute for youtube to publish it in higher res

  • @daninspace9009
    @daninspace9009 Год назад

    why don't just ln -s ?

  • @manankataria
    @manankataria Год назад

    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 ☺️.

  • @umangbhalla
    @umangbhalla 3 года назад

    fuck yeah

  • @arnoldwolfstein
    @arnoldwolfstein 3 года назад +1

    Sorry but I didn't see anything in this video, even installing and configuring stow.

  • @DragonKidPlaysMC
    @DragonKidPlaysMC 3 года назад

    .stow-local-ignore doesn’t seem to work

  • @amit12000
    @amit12000 2 года назад

    Please also make video using bare method also

  • @007arek
    @007arek 3 года назад +1

    Did they fix the dot- prefix, --dotfiles option?

    • @michaelphillips8952
      @michaelphillips8952 Год назад

      What issues are you finding with it. I have version 2.3.1

    • @007arek
      @007arek Год назад +1

      @@michaelphillips8952 it seems that they didn't fix it
      aspiers/stow/issues/33

  • @kagebun287
    @kagebun287 2 года назад

    ✔️ how it works?
    ❌ why you might want to do it?
    Why not just `cd ~; git init`?

  • @dachd
    @dachd 3 года назад +1

    Why Stow and not YADM?

  • @____-gy5mq
    @____-gy5mq 3 года назад

    Use chezmoi instead, your root will thank you.

  • @mizel_1121
    @mizel_1121 3 года назад

    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

  • @richardbennett4365
    @richardbennett4365 Год назад

    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.

  • @richardbennett4365
    @richardbennett4365 Год назад

    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.

  • @frutiboy1
    @frutiboy1 2 года назад

    Why do I need to watch 12 minutes video about something that can be said in 3 words 😭? It creates symlink!

    • @chrisatmachine
      @chrisatmachine  2 года назад +5

      Because this video explains a use case beyond "It creates symlink".