Giter VIP home page Giter VIP logo

dotfiles's Introduction

Dotfiles

Those dotfiles are managed with a bare Git repository.

Nvim configs of inspiration

Where I have copy/pasted many configs :)

How to

The idea is well explained on this vieo and on this post of atlassian.

  1. On your home directory you need to do:
## Create a folder on $HOME
mkdir .dotfiles

## init git bare repo
git init --bare $HOME/.dotfiles

## create an alias
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'

## avoid show untracked files
dotfiles config --local status.showUntrackedFiles no

## add the repo as remote origin
dotfiles remote add origin [email protected]:ggsalas/dotfiles.git

## replace all tracked files with the repo files
dotfiles fetch
dotfiles pull origin master
dotfiles reset --hard origin/master
dotfiles branch --set-upstream-to=origin/master master
dotfiles pull
  1. Now you can use the dotfiles repo as it was git command. Example:
dotfiles add .zshrc
dotfiles commit
dotfiles push

How this repo was created

To create a new git bare repo to handle your dotfiles you only need to do this:

git init --bare $HOME/.dotfiles
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
dotfiles config --local status.showUntrackedFiles no

also add a alias on .zshrc or .bashrc:

alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'

To see the untracked files on a specific folder:

df status -u ~/<folder}

dotfiles's People

Contributors

ggsalas avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.