Exclude files from your dropbox using glob patterns and take advantage of existing .gitignore
files.
This is a simple shell script that can be used to ignore files from dropbox using glob patterns, .dropboxignore
files and the already existing .gitignorefiles
. The shell script uses this approach to ignore the matched files.
- Ignore folders or files based on glob patterns inside the
.dropboxignore
file. - Automatically generate
.dropboxignore
files based on existing.gitignore
files. - Ignore specific folders or files via CLI.
- Revert ignored folders or files
- Delete
.dropboxignore
files - Update
.dropboxignore
files when changes are detected in corresponding.gitignore
files. - List ignored files and folders
dropboxignore is installed by running one of the following commands in your terminal. You can install this via the command-line with either curl, wget or another similar tool. attr
and git
package should be installed on your system.
Mathod | Command |
---|---|
curl | sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/sp1thas/dropboxignore/master/utils/install.sh)" |
wget | sudo sh -c "$(wget -qO- https://raw.githubusercontent.com/sp1thas/dropboxignore/master/utils/install.sh)" |
fetch | sudo sh -c "$(fetch -o - https://raw.githubusercontent.com/sp1thas/dropboxignore/master/utils/install.sh)" |
$ snap install dropboxignore
$ git clone https://github.com/sp1thas/dropboxignore.git
$ cd dropboxignore
$ make test # optional step, bats should be in your PATH
$ sudo make install
$ sudo make uninstall
In order to use this script you have to select the action and the file or folder that the action will take place.
A common workflow could be the following
- Automatically generate
.dropboxignore
files based on existing.gitignore
files (dropboxignore generate path
). - Manually update or create
.dropboxignore
files (Optional) - Ignore matched files based on
.dropboxignore
files (dropboxignore ignore path
)
Case | Solution |
---|---|
![]() |
$ dropboxignore ignore ./node_modules |
![]() |
$ dropboxignore ignore ./venv |
- In order to prevent unpleasant data losses, exception patterns are not supported. Both
.gitignore
and.dropboxignore
files with at least one exceptional pattern will be bypassed (for further details: #3). - Automatic generation of
.dropboxignore
files is an optional step, therefore, may not be a necessary action for your case.
For futher details check out the documentation
If you want to contribute, read docs/contributing.md guide for further details.
*Logo is based on papirus-icon-theme