Skip to content

Commit dca7bd3

Browse files
committed
doc: Add developer notes about gitignore
- Add developer notes about `.gitignore.` - Remove qt creator specific files from gitignore, to be consistent.
1 parent 923c5e9 commit dca7bd3

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ src/test/buildenv.py
8585
# Resources cpp
8686
qrc_*.cpp
8787

88-
# Qt creator
89-
*.pro.user
90-
9188
# Mac specific
9289
.DS_Store
9390
build

doc/developer-notes.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,36 @@ Threads
171171
- BitcoinMiner : Generates bitcoins (if wallet is enabled).
172172

173173
- Shutdown : Does an orderly shutdown of everything.
174+
175+
Ignoring IDE/editor files
176+
--------------------------
177+
178+
In closed-source environments in which everyone uses the same IDE it is common
179+
to add temporary files it produces to the project-wide `.gitignore` file.
180+
181+
However, in open source software such as Bitcoin Core, where everyone uses
182+
their own editors/IDE/tools, it is less common. Only you know what files your
183+
editor produces and this may change from version to version. The canonical way
184+
to do this is thus to create your local gitignore. Add this to `~/.gitconfig`:
185+
186+
```
187+
[core]
188+
excludesfile = /home/.../.gitignore_global
189+
```
190+
191+
(alternatively, type the command `git config --global core.excludesfile ~/.gitignore_global`
192+
on a terminal)
193+
194+
Then put your favourite tool's temporary filenames in that file, e.g.
195+
```
196+
# NetBeans
197+
nbproject/
198+
```
199+
200+
Another option is to create a per-repository excludes file `.git/info/exclude`.
201+
These are not committed but apply only to one repository.
202+
203+
If a set of tools is used by the build system or scripts the repository (for
204+
example, lcov) it is perfectly acceptable to add its files to `.gitignore`
205+
and commit them.
206+

0 commit comments

Comments
 (0)