Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 110 lines (67 sloc) 3.528 kb
f263373 @mcantelon Added readme.
authored
1 # deja
2
3 deja is a node.js-driven CLI utility for managing the git versioning of home
06c5cc0 @mcantelon Did overhaul of readme.
authored
4 directory sundries, such as dotfiles and personal scripts. deja was inspired by
5 the Ruby application [homesick](https://github.com/technicalpickles/homesick).
6
7 ## The Basics
8
9 Putting your dotfiles and personal scripts into a Git repository offers a lot
10 of advantages, but there's one obstacle: Git won't let you clone directly into
11 your home directory. One can, however, clone a repo to another directory then
f9b649b @mcantelon Minor readme tweak.
authored
12 use symbolic links to point from one's home directory to the cloned files. This
13 is no fun to do manually, but deja automates the process.
f263373 @mcantelon Added readme.
authored
14
15 If you have a Git repository containing your dotfiles, for example, you can
06c5cc0 @mcantelon Did overhaul of readme.
authored
16 clone this repo, automatically adding symlinks in your home directory to the
17 items in it, using a deja command like:
f263373 @mcantelon Added readme.
authored
18
19 deja clone git@github.com:mcantelon/dotfiles.git
20
6a8320c @mcantelon Added note about auto submodule updating.
authored
21 The repo would then be stored at `~/.deja/dotfiles`. If your repo contains
22 submodules, deja will automatically initialize and update them.
06c5cc0 @mcantelon Did overhaul of readme.
authored
23
24 Git repo URLs default to Github and the `.git` at the end of a repo URL can be
25 left off, so you could also do a quick read-only clone by entering the
26 following:
a355c1d @mcantelon Tweaked README.
authored
27
28 deja clone mcantelon/dotfiles
0fcfcd7 @mcantelon Tweak to readme.
authored
29
9cac85d @mcantelon Added deja pull example.
authored
30 To update this repo you'd enter:
31
e242edc @mcantelon Tweaks to readme.
authored
32 deja pull dotfiles
9cac85d @mcantelon Added deja pull example.
authored
33
e242edc @mcantelon Tweaks to readme.
authored
34 To remove this repo (and any home directory symlinks) you'd enter:
cacb2c1 @mcantelon added deja rm command.
authored
35
e242edc @mcantelon Tweaks to readme.
authored
36 deja rm dotfiles
cacb2c1 @mcantelon added deja rm command.
authored
37
06c5cc0 @mcantelon Did overhaul of readme.
authored
38 To see all repos you've cloned you'd enter:
f263373 @mcantelon Added readme.
authored
39
06c5cc0 @mcantelon Did overhaul of readme.
authored
40 deja ls
ceb1f21 @mcantelon Readme tweaks.
authored
41
b7e4d3e @mcantelon Updated readme with info on ls output.
authored
42 To see the contents of a repo you'd enter:
43
44 deja ls dotfiles
45
46 If using the `ls` command to view items in a repo, additional information
47 about each entry may be shown. If an entry is a directory, "dir" will be added.
48 If there isn't a home directory entry linking the repo entry, "unlinked" will be
49 added. If there is a home directory entry with the same name as a repo entry,
50 "conflicts" will be added.
51
06c5cc0 @mcantelon Did overhaul of readme.
authored
52 ## Other Stuff
ceb1f21 @mcantelon Readme tweaks.
authored
53
06c5cc0 @mcantelon Did overhaul of readme.
authored
54 To see the differences between a repo and what currently exists in your
55 home directory you'd enter something like this:
56
57 deja diff dotfiles
ceb1f21 @mcantelon Readme tweaks.
authored
58
740ac5f @mcantelon Updating readme.
authored
59 To remove links to your repo, for whatever reason, you'd enter:
60
61 deja unlink dotfiles
62
06c5cc0 @mcantelon Did overhaul of readme.
authored
63 To re-add links to your repo after removing them, you'd enter:
740ac5f @mcantelon Updating readme.
authored
64
65 deja link dotfiles
66
06c5cc0 @mcantelon Did overhaul of readme.
authored
67 ## Repo Subdirectories
68
69 When deja clones, it just adds symlinks to the first level of files and
70 directories contained in your repo, skipping symlink creation when a file
71 or directory of the same name already exists in the home directory.
72
73 If your repo contains a `bin` directory, but you already have a `bin` directory
74 in your home directory, deja would skip creation of a symlink to `bin`.
75
76 If, however, you wanted to create symlinks in your home directory's `bin`
60e64fd @mcantelon Minor corrections.
authored
77 directory to the contents of your repo's `bin` directory you could do so by
06c5cc0 @mcantelon Did overhaul of readme.
authored
78 entering:
79
80 deja link dotfiles/bin
81
82 If you did this and changed your mind you could remove the symlinks by entering:
83
84 deja unlink dotfiles/bin
4d24879 @mcantelon Added install instructions.
authored
85
86 ## Installation
87
c59fe14 @mcantelon More tweaks to readme.
authored
88 The easiest way is via [npm](https://github.com/isaacs/npm):
89
4d24879 @mcantelon Added install instructions.
authored
90 npm install deja
06c5cc0 @mcantelon Did overhaul of readme.
authored
91
92 ## Dependencies
93
23a87f8 @mcantelon More tweaks to readme.
authored
94 deja requires the [wrench.js](https://github.com/ryanmcgrath/wrench-js) and
95 [optimist](https://github.com/substack/node-optimist) node.js modules (both
96 are available via npm as "wrench" and "optimist" respectively).
06c5cc0 @mcantelon Did overhaul of readme.
authored
97
23a87f8 @mcantelon More tweaks to readme.
authored
98 deja, of course, requires [git](http://git-scm.com/) to be installed.
c59fe14 @mcantelon More tweaks to readme.
authored
99
100 ## Testing
101
102 Testing requires the [expresso](ihttps://github.com/visionmedia/expresso)
50ea275 @mcantelon Tweaked readme... forgot to list should.js as required for tests.
authored
103 and [should.js](https://github.com/visionmedia/should.js) modules (available
104 via rpm as "expresso" and "should" respectively).
c59fe14 @mcantelon More tweaks to readme.
authored
105
106 Run the tests by entering:
107
108 expresso
109
Something went wrong with that request. Please try again.