Git Exercises

Fill in the blanks to complete the code.

1

Initialize a new Git repository

git
2

Stage all changes for commit

git .
3

Commit staged changes with a message

git -m "Initial commit"
4

Push commits to the remote origin

git origin main
5

Merge a feature branch into current branch

git feature-branch
6

Clone a remote repository

git https://github.com/user/repo.git
7

Create and switch to a new branch

git checkout new-feature
8

View the commit history

git