0
0
Gitdevops~10 mins

Creating a repository with git init - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to initialize a new Git repository.

Git
git [1]
Drag options to blanks, or click blank then click option'
Acommit
Binit
Cclone
Dpush
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'clone' instead of 'init' to create a new repository.
Trying to 'commit' before initializing the repository.
2fill in blank
medium

Complete the command to create a new directory and initialize a Git repository inside it.

Git
mkdir my_project && cd my_project && git [1]
Drag options to blanks, or click blank then click option'
Ainit
Bbranch
Cadd
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'status' which only shows repository status.
Using 'add' which stages files, not initializes.
3fill in blank
hard

Fix the error in the command to initialize a Git repository.

Git
git [1]
Drag options to blanks, or click blank then click option'
Aclone
Bcommit
Cinit
Dpush
Attempts:
3 left
💡 Hint
Common Mistakes
Typing 'git init init' which is invalid.
Confusing 'init' with other commands.
4fill in blank
hard

Fill both blanks to create a new directory and initialize a Git repository inside it.

Git
mkdir [1] && cd [2] && git init
Drag options to blanks, or click blank then click option'
AprojectX
Bmy_repo
Dyour_repo
Attempts:
3 left
💡 Hint
Common Mistakes
Using different names for creating and entering the directory.
Leaving one blank empty.
5fill in blank
hard

Fill all three blanks to initialize a Git repository, add all files, and make the first commit.

Git
git init && git [1] . && git [2] -m [3]
Drag options to blanks, or click blank then click option'
Aadd
Bcommit
C"Initial commit"
Dpush
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'push' instead of 'commit' for saving changes.
Forgetting to add files before committing.
Not quoting the commit message.