docs(readme): added .gitignore tips and some wording tweaks

pull/18/head
kevin zhuang 4 years ago
parent 6b512699e0
commit 95eb81770f

@ -17,8 +17,7 @@ Pros:
- No symlink - No symlink
- Simple setup/remove - Simple setup/remove
- Customization - Customizable
- Minimal dependency
- Easy migration - Easy migration
- Flat learning curve - Flat learning curve
- Manage dotfiles in any directory - Manage dotfiles in any directory
@ -59,8 +58,6 @@ with minimal set up required.
- [Migration](#migration) - [Migration](#migration)
- [Migrating from normal git bare repository](#migrating-from-normal-git-bare-repository) - [Migrating from normal git bare repository](#migrating-from-normal-git-bare-repository)
- [Migrating from a generic symlink setup or GNU stow](#migrating-from-a-generic-symlink-setup-or-gnu-stow) - [Migrating from a generic symlink setup or GNU stow](#migrating-from-a-generic-symlink-setup-or-gnu-stow)
- [Keep your current setup but integrate dotbare](#keep-your-current-setup-but-integrate-dotbare)
- [Complete migration](#complete-migration)
- [Migrating dotbare to a new system](#migrating-dotbare-to-a-new-system) - [Migrating dotbare to a new system](#migrating-dotbare-to-a-new-system)
- [Test it in docker](#test-it-in-docker) - [Test it in docker](#test-it-in-docker)
- [Customization](#customization) - [Customization](#customization)
@ -141,7 +138,7 @@ antigen bundle kazhala/dotbare
dotbare comes with a `dotbare.plugin.bash` which will enable both bash command line dotbare comes with a `dotbare.plugin.bash` which will enable both bash command line
completion for dotbare commands and adding dotbare to your PATH. If you don't want the completion, completion for dotbare commands and adding dotbare to your PATH. If you don't want the completion,
simply follow the instructions in [Others](#Others) and add dotbare to your PATH. simply follow the instructions in [others](#others) and add dotbare to your PATH.
- Clone the repository (change ~/.dotbare to the location of your preference) - Clone the repository (change ~/.dotbare to the location of your preference)
@ -155,7 +152,7 @@ simply follow the instructions in [Others](#Others) and add dotbare to your PATH
source ~/.dotbare/dotbare.plugin.bash source ~/.dotbare/dotbare.plugin.bash
``` ```
### Others ### others
1. Clone the repository (change ~/.dotbare to the location of your preference) 1. Clone the repository (change ~/.dotbare to the location of your preference)
@ -564,12 +561,24 @@ except you don't have to cd into dotbare directory, you can run this command any
- `dotbare` has disabled the command `dotbare add --All` as it is a really dangerous command in the conext of `dotbare` as it will stage everything in your \$DOTBARE_TREE to the index. - `dotbare` has disabled the command `dotbare add --All` as it is a really dangerous command in the conext of `dotbare` as it will stage everything in your \$DOTBARE_TREE to the index.
```sh ```sh
# Recommanded ways # Recommended ways
dotbare fadd # and then press alt-a to select all dotbare fadd # and then press alt-a to select all
dotbare add -u # stage all modified file to index dotbare add -u # stage all modified file to index
dotbare commit -am "message" # this also works, it will stage all modified files and then commit dotbare commit -am "message" # this also works, it will stage all modified files and then commit
``` ```
- Add the value of `$DOTBARE_DIR` to global .gitignore to avoid any weird recursion problem if accidentally adding
`$DOTBARE_DIR` to index, the value needs to be relative path to `$DOTBARE_TREE`
```sh
# e.g. DOTBARE_DIR="$HOME/.cfg", DOTBARE_TREE="$HOME"
echo ".cfg" >> $HOME/.gitignore
# e.g. DOTBARE_DIR="$HOME/.config/.cfg" DOTBARE_TREE="$HOME"
echo ".config/.cfg" >> $HOME/.gitignore
# e.g. DOTBARE_DIR="$HOME/.config/.cfg" DOTBARE_TREE="$HOME/.config"
echo ".cfg" >> $HOME/.gitignore
```
## Testing ## Testing
dotbare is unit tested on a _best effort_ due the nature of fzf which require human input. dotbare is unit tested on a _best effort_ due the nature of fzf which require human input.
@ -592,9 +601,10 @@ Leave a star if possible :)
## Coming up ## Coming up
- [ ] Improve unit test with mocking - [ ] Improve unit test with mocking
- [ ] Command line completion for dotbare commands - [ ] Support submodules during migration
- [ ] Command line completion for dotbare in zsh
- [x] Command line completion for dotbare in bash
- [ ] Man page - [ ] Man page
- [ ] Command line completion for git commands?
- [ ] Installation method - [ ] Installation method
## Background ## Background

Loading…
Cancel
Save