You only need to commit the Assets and ProjectSettings folders. When you run Unity, it will automatically create other files and folders for you if those do not exist.
To make Unity compatible with Git, make sure you do the followings in Unity:
- Go to Edit->Project Settings->Editor.
- In Version Control, select "Visible Meta Files".
- In Asset Serialization, select "Force Text".
- When you open the project, you might see an empty scene with nothing. If that's the case, go to the Assets/Scenes folder and double-click on Level_1. It will load a scene with a light red cube and a black rectangle in the scene.
- Click the Play button at the top in Unity and you will enter Play Mode.
- You can move the cube left and right and press Space to jump.