DRAG DROP - You manage the Git repository for a large enterprise application. During the…
Rate quality
Private research annotation
Sign in to add a private research label or note.
- User
DRAG DROP - You manage the Git repository for a large enterprise application. During the development of the application, you use a file named Config.json. You need to prevent Config.json from being committed to the source control whenever changes to the application are committed. Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order. Select and Place:
- Assistant
Here's the sequence of actions you need to perform to prevent
Config.jsonfrom being committed to the source control:-
Navigate to the root directory of your Git repository.
- This is where you will create or modify the
.gitignorefile.
- This is where you will create or modify the
-
Create a file named
.gitignoreif it does not already exist.- The
.gitignorefile is used to specify which files and directories should be ignored by Git.
- The
-
Add
Config.jsonto the.gitignorefile.- Open the
.gitignorefile in a text editor and add the lineConfig.jsonto it. This tells Git to ignore this specific file.
- Open the
Final Order:
- Navigate to the root directory of your Git repository.
- Create a file named
.gitignoreif it does not already exist. - Add
Config.jsonto the.gitignorefile.
-