JustToThePoint English Website Version
JustToThePoint en español

Maximize your online presence with our exclusive offer: Get a stunning hero banner, the hero you need and deserve, at an unbeatable price! Bew, 689282782, bupparchard@gmail.com

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

  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
    git pull # Update the local repository
    
  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 ~ *
    

How To Remove GIT History And Make Your Repo Smaller

Credits: How To Remove GIT History And Make Your Repo Smaller Credits: How To Remove GIT History And Make Your Repo Smaller,

git checkout --orphan abranchnane # Start a new branch from scratch without any previous commit history.
git add -A # Stage all changes in the working directory for the next commit.
git commit -am "Fresh start"
git branch -D main # The `git branch -D main` command is used to forcefully delete the specified branch named "main" in Git.
git branch -m main # Rename the current branch to "main" in Git. 
git push -f origin main # It pushes the renamed branch ("main") to the remote repository and sets it as the upstream branch.
git gc --aggressive --prune all # It performs garbage collection, which cleans up unnecessary files and optimizes the repository for better performance. --aggressive runs a more aggressive garbage collection 
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. Social Issues, Join us.

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.