info: For assistance with this tutorial, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments-to-other-projects-and-subjects.
---
# Make your first Git commit
This tutorial is going to teach you a little bit about how Git works. It walks
you through the steps of creating your own project, editing a file, and
committing changes to a Git repository from the command line.
When you're done, you'll have a project where you can practice using Git.
## What you need
Before you begin:
- [Install Git on your local machine](../topics/git/how_to_install_git/index.md).
- Ensure you can sign in to an instance of GitLab. If your organization doesn't
Now you're ready to merge the changes from your `example-tutorial-branch` branch
to the default branch (`main`).
1. Check out the default branch for your repository.
```shell
git checkout main
```
1. Merge your branch into the default branch.
```shell
git merge example-tutorial-branch
```
1. Push the changes.
```shell
git push
```
NOTE:
For this tutorial, you merge your branch directly to the default branch for your
repository. In GitLab, you typically use a [merge request](../user/project/merge_requests/)
to merge your branch.
### View your changes in GitLab
You did it! You updated the `README.md` file in your branch, and you merged those changes
into the `main` branch.
Let's look in the UI and confirm your changes. Go to your project.
- Scroll down and view the contents of the `README.md` file.
Your changes should be visible.
- Above the `README.md` file, view the text in the **Last commit** column.
Your commit message is displayed in this column:
![Commit message](img/commit_message_v14_10.png)
Now you can return to the command line and change back to your personal branch
(`git checkout example-tutorial-branch`). You can continue updating files or
creating new ones. Type `git status` to view the status
of your changes and commit with abandon.
Don't worry if you mess things up. Everything in Git can be reverted, and if you
find you can't recover, you can always create a new branch and start again.
Nice work.
## Find more Git learning resources
- Get a complete introduction to Git in the <iclass="fa fa-youtube-play youtube"aria-hidden="true"></i> [Git for GitLab](https://www.youtube.com/watch?v=4lxvVj7wlZw) beginner's course (1h 33m).
- Find other tutorials about Git and GitLab on the [tutorials page](index.md).