Git Product home page Git Product logo

dit's People

Contributors

vulpino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

prodject

dit's Issues

Auto-creation of dotfile folders

In addition to dotfiles themselves it's common to have folders that contain dotfile-like files. For example I have a .hammerspoon directory with has lua files in it that I'd like to sync. Maybe .vim too?

This almost works right now except it doesn't auto-create those directories so the symlink creation fails because it's trying to create the link in a folder that doesn't exist.

What do you think about making the following addition?

 def self.symlink_list(list)
   list.each do |f|
     f.strip!
     wd_f = File.absolute_path f
     home_f = File.absolute_path(f).gsub(Dir.getwd, Dir.home)
+    home_dir_f = File.dirname(home_f)
+    FileUtils.mkdir_p(home_dir_f)
     symlink wd_f, home_f
   end 
end

Alternatively, maybe it should symlink the folder itself? In that case you'd have to change how you get the file list using git ls-tree.

Cleanup command from Dotbot

I like this project a whole lot better than Dotbot, and have already switched to it. However, there is one thing I miss from Dotbot, and that is the cleanup of dead links. Before Dotbot starts it's symlinking, it removes all dead links and then checks all the existing links before it makes new symlinks for the dotfiles.

In other words, whereas the result from Dotbot's process is a correct set of symlinks for all dotfiles, the result from Dit's process could be dead links for files that used to exist but doesn't anymore, and a lot of "Failed to symlink" errors.

This is annoying and possibly a huge problem if you (like me) have sets of interdependent dotfiles for eg. zsh, vim or even tmux.

Can you expand on what this does?

Hi,
I saw your project on onethingwell and now I'm wondering whether I correctly understand what it's supposed to do.

When you say "dotfile", you mean files like .bashrc .bash_aliases, .gdbinit in my home folder, right?
So I would put these files in a git repository somewhere, say ~/my_repos/my_dotfiles/ and then symlink to that. Instead of doing that manually, your project adjusts the links correctly when I pull new files I edited elsewhere?

Another question regarding the setup: where does dit init need to be executed? I suppose in the new repo location because the home folder is easier to find.
So basically, it would then be

mkdir ~/my_repos/my_dotfiles/ 
cd ~/my_repos/my_dotfiles/
dit init 

Can you comment on that?
Kind regards,
Matthias

Old and new command act differently

I'm sure they shouldn't act differently, and I doubt whether just typing kommit should even work anymore. Perhaps give a little deprecation notice for a few versions and then stop working completely...?

tom > ~/dev/schooling > brew install kommit                                                                                                                                                                                    master
==> Downloading https://homebrew.bintray.com/bottles/kommit-1.1.0.el_capitan.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/kommit-1.1.0.el_capitan.bottle.tar.gz
==> Pouring kommit-1.1.0.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/kommit/1.1.0: 4 files, 11.2K
 tom > ~/dev/schooling > kommit                                                                                                                                                                                                 master
Invalid usage...
usage: kommit [-m <msg> | -c | -e | -s | -i | -r | -h]

    -m <msg>        append message
    -c              check if hook installed ?
    -e              edit messages
    -s              show current message(s)
    -i              install kommit hook to .git/hooks/prepare-commit-msg
    -r              remove kommit hook, delete .git/hooks/prepare-commit-msg
    -h              print this message

 tom > ~/dev/schooling > git kommit                                                                                                                                                                                             master
Alias tip: g kommit
Invalid usage...
usage: git-kommit [-m <msg> | -t <msg> | -c | -e | -s | -i | -r | -h]

    -m <msg>        append message
    -t <msg>        append message with timestamp
    -c              check if hook installed ?
    -e              edit messages
    -s              show current message(s)
    -i              install kommit hook to .git/hooks/prepare-commit-msg
    -r              remove kommit hook, delete .git/hooks/prepare-commit-msg
    -h              print this message

 tom > ~/dev/schooling >

Ignore README.md?

I'd understand why it'd be complicated and a dumb idea to ignore any files—and I'm totally happy to just remove the symlinked README.md when necessary. Just thought I'd mention it!

Really loving dit! Thanks for making it. 😁

Folders

I have some folders in my dotfiles, like .ssh, .tmux, .config and so on. Right now these are ignored, and I have to manually recreate them in $HOME, after which dit works fine. Except of course if there are subdirectories...
Would it be possible to simply create symlinks for the directories as well?

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.