Closed lmoureaux closed 6 years ago
In the interim as a reminder never use git add -a .
(or is it capital A
...either way point stands)
Actually it would be even better if you force .gitignore
to ignore everything with certain exceptions (like do not ignore .py or .h etc). You can look here for inspiration: https://github.com/cms-gem-daq-project/xhal/blob/develop/.gitignore
Actually it would be even better if you force
.gitignore
to ignore everything with certain exceptions (like do not ignore .py or .h etc).
That's what the existing .gitignore
does, but make
creates Python and Markdown files in a "source" directory (pkg
), and an additional directory (rpm
). In your example, I can see the following:
# Ignore RPM directories
*/rpm
This is close to what I do in this PR.
actually, l37 in the example is not quite required... What I would rather like to see:
# Ignore everything
*
# Don't ignore subdirectories
!*/
# Don't ignore source files, etc
!*.gitignore
!*.c
!*.cpp
!*.cc
!*.C
!*.h
!*.hh
!*.hpp
!*.py
in this case even git commit -a
won't really add too much )
@mexanick Please take a look at the existing .gitignore
.
ehm, how come then that pkg/git rm
will help =)
how come then that pkg/ and rpm/ become trackable by git?
# Don't ignore subdirectories !*/
In addition, pkg
contains tracked files that are needed to build the package.
Sorry I didn't see this in time to prevent this merge, but you implemented it in a non-optimal way...
As @lmoureaux noted, you can easily ignore a specific directory even after !*/
in the .gitignore
, so I'm not sure why pkg
as a whole wasn't ignored, and the few tracked files unignored...
Also, I'm not sure why this was an issue in the first place...
I would probably be in favour of reverting this and if deciding to go forward, doing it "right"
As you wish.
...this in time to prevent this merge...
To prevent further issues in the future perhaps we could set a designated time per week that approved PR's get merged.
I think the weekly Friday ops meeting might be an ideal time period.
Description
Add the following entries to .gitignore:
Types of changes
Motivation and Context
After running
make rpm
ormake pip
,git
thinks that the tree is dirty.How Has This Been Tested?
Ran
git status
aftermake pip
andmake rpm
to ensure that I didn't miss any file.Checklist: