Merge pull request #6878
dca7bd3
doc: Add developer notes about gitignore (Wladimir J. van der Laan)
This commit is contained in:
commit
867d6c90b8
2 changed files with 33 additions and 3 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -85,9 +85,6 @@ src/test/buildenv.py
|
|||
# Resources cpp
|
||||
qrc_*.cpp
|
||||
|
||||
# Qt creator
|
||||
*.pro.user
|
||||
|
||||
# Mac specific
|
||||
.DS_Store
|
||||
build
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue