Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
git_tutorial
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
orestis.malaspin
git_tutorial
Commits
1d8bcf97
Verified
Commit
1d8bcf97
authored
3 years ago
by
orestis.malaspin
Browse files
Options
Downloads
Patches
Plain Diff
removed gitignore tuto because it is in base tuto
parent
8de71779
No related branches found
No related tags found
No related merge requests found
Pipeline
#14830
failed
3 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
git_tutorial_gitignore.md
+0
-45
0 additions, 45 deletions
git_tutorial_gitignore.md
with
0 additions
and
45 deletions
git_tutorial_gitignore.md
deleted
100644 → 0
+
0
−
45
View file @
8de71779
% Introduction à Git partie 2
% Orestis Malaspinas
% commit e5c2d675e68c4df94a9d3b0df48f8feb5ec9c1ab
# Le fichier `.gitignore`
## L'état des fichiers
Git voit les fichiers dans trois états possibles:
1.
*tracked*
, un fichier qui a été
`add`
(
`staged`
) ou
`commit`
(dans la terminologie git).
2.
*untracked*
, un fichier qui n'a pas été
`add`
ou
`commit`
.
3.
*ignored*
, un fichier qui est explicitement ignoré par git.
## Quels fichiers ignorer
On ignore typiquement:
*
Les fichiers binaires: exécutables, images, ...
*
Les produits de compilation:
`*.o`
,
`*.pyc`
, ...
*
Les produits d'exécutions: logs, ...
*
Les fichiers de configuration d'un IDE: .vscode, ...
*
Les fichiers système.
## Comment ignorer des fichiers?
*
Créer un fichier texte nommé
`.gitignore`
.
*
L'ajouter au répo git et le "commit".
*
Y ajouter les règles à suivre pour ingorer les fichiers.
Exemple: [^1]
```
bash
biden
# ignore le fichier biden
*
.o
# ignore tous les fichier `.o`
!
trump.o
# mais PAS trump.o
sanders
# ignore le répertoire sanders
**
/sanders
# ignore tous les répertoires sanders
```
[
^1
]:
Pour
une liste plus exhaustive voir le site
<https://bit.ly/2HTZJyQ>
par exemple.
## Bibliographie
Ces quelques slides sont inspirés du site
<https://bit.ly/2HTZJyQ>
.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment