diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-10-26 08:20:32 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-10-26 08:21:03 +0100 |
commit | 867d6c90b85070644c3458e3e7ed168765523361 (patch) | |
tree | 983a507c7b64d16dec06cfb3b6c77906ac2dc5f3 | |
parent | 450893769f7af89fa985c02a8723be43176e60b2 (diff) | |
parent | dca7bd3152c5c21aa0a2b14aa09d4045ae51dcc5 (diff) |
Merge pull request #6878
dca7bd3 doc: Add developer notes about gitignore (Wladimir J. van der Laan)
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | doc/developer-notes.md | 33 |
2 files changed, 33 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore index a8035731d1..8ad862d84c 100644 --- a/.gitignore +++ b/.gitignore @@ -85,9 +85,6 @@ src/test/buildenv.py # Resources cpp qrc_*.cpp -# Qt creator -*.pro.user - # Mac specific .DS_Store build diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 4189d22187..7fe292f1f8 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -171,3 +171,36 @@ Threads - BitcoinMiner : Generates bitcoins (if wallet is enabled). - Shutdown : Does an orderly shutdown of everything. + +Ignoring IDE/editor files +-------------------------- + +In closed-source environments in which everyone uses the same IDE it is common +to add temporary files it produces to the project-wide `.gitignore` file. + +However, in open source software such as Bitcoin Core, where everyone uses +their own editors/IDE/tools, it is less common. Only you know what files your +editor produces and this may change from version to version. The canonical way +to do this is thus to create your local gitignore. Add this to `~/.gitconfig`: + +``` +[core] + excludesfile = /home/.../.gitignore_global +``` + +(alternatively, type the command `git config --global core.excludesfile ~/.gitignore_global` +on a terminal) + +Then put your favourite tool's temporary filenames in that file, e.g. +``` +# NetBeans +nbproject/ +``` + +Another option is to create a per-repository excludes file `.git/info/exclude`. +These are not committed but apply only to one repository. + +If a set of tools is used by the build system or scripts the repository (for +example, lcov) it is perfectly acceptable to add its files to `.gitignore` +and commit them. + |