-
-
Notifications
You must be signed in to change notification settings - Fork 954
-
Hoping to add all files in the directory using git add .
, including files starting with a period like .gitignore
.
Calling the following:
repo.index.add(['.'])
Stages the .git
folder and all its history.
Beta Was this translation helpful? Give feedback.
All reactions
repo.index
can't be used for cases like this as it's not a complete implementation of 'pathspecs'. It's a much narrower implementation that can be considered 'expert mode'.
By default, I recommend using repo.git.add('.')
instead to have the work done by git
instead.
Replies: 1 comment
-
repo.index
can't be used for cases like this as it's not a complete implementation of 'pathspecs'. It's a much narrower implementation that can be considered 'expert mode'.
By default, I recommend using repo.git.add('.')
instead to have the work done by git
instead.
Beta Was this translation helpful? Give feedback.