JustToThePoint English Website Version
JustToThePoint en español
JustToThePoint in Thai

Dotfiles with Git + GNU Stow.

  1. We need to install stow, a symlink farm manager: sudo apt install stow git

  2. First-Time git setup. Set your user name and email address: git config ‐‐global user.name “userName”. git config ‐‐global user.email “myEmail@gmail.com. Then, check your settings: git config ‐‐list

  3. Go to github. Log in to your account. Click on the New repository button or the + icon, then click on New repository. Next you have to fill out a name of the repository (dotfiles), a description (it is really optional), and select its visibility or access permission (public -Anyone on the internet can see this repository. You choose who can commit- or private -You choose who can see and commit to this repository-).

  4. After that you have your new repository, so you can copy the repository link by clicking on the green Code button. Open a terminal and clone the repository (very easy setup):

      git clone https://github.com/nmaximo7/dotfiles.git
    
  5. Open the directory dotfiles with Visual Studio Code: code dotfiles.

  6. Mirror your home’s structure inside the dotfiles directory, e.g., create a directory git, and a file “.gitconfig” inside git; create a directory bash, and two files “.bash_aliases” and “.bashrc” inside bash. Manage and sync dotfiles with Git + GNU Stow

    Manage and sync dotfiles with Git + GNU Stow

  7. Check if stow is going to create the right symlinks or not before creating then: stow ‐‐adopt -nvt ~ * (~ directory home, * the dotfiles directory).

    And then create them: stow ‐‐adopt -vt ~ * The flag -n tells stow not to perform any operations that modify the filesystem, but merely show what would happen. -t is the target (~, the home directory).

    MV: .config/calcurse/conf -> dotfiles/Calcurse/.config/calcurse/conf LINK: .config/calcurse/conf => ../../dotfiles/Calcurse/.config/calcurse/conf9.

  8. We use the git add . command to add any changes in the working directory to the staging area: git add .

  9. Save changes to the local repository: git commit -am “Initial commit”

  10. Upload the local repository content to our recently created github remote repository: git push.

  11. If you have a new computer, you will start by cloning the remote repository: git clone https://github.com/nmaximo7/dotfiles.git. After that you can update the local repository with: git pull.

  12. Stow the files and directories into the target directory. First, check that it is working as expected: stow ‐‐adopt -nvSt ~ *, then do it: stow ‐‐adopt -vSt ~ *

git clone https://github.com/nmaximo7/dotfiles.git cd dotfiles stow –adopt -nvSt ~ * stow –adopt -vSt ~ *

Bitcoin donation

JustToThePoint Copyright © 2011 - 2024 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.