# Steps to set up a Git repository and make an initial commit:

1. Create a new folder to contain the Git repository. This can be done through a file explorer or command line.
    
2. Open a terminal/command prompt and navigate to the new folder.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1694963360632/9b830d90-2cde-4acb-8e94-4a86bfa2db13.png align="center")
    
3. Type "git init" and press enter. This will initialize an empty Git repository in that folder
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1694963418437/eaa8607f-e582-431b-bd3e-0c8d83ca2038.png align="center")
    
4. Create some files in that folder, like [README.md](http://README.md). You can create empty files from the command line using "touch filename"
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1694963512016/7480562c-4c14-4fc0-8a39-eede66052706.png align="center")
    
5. Add the files to the staging area with "git add ." The period adds all new files recursively
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1694963550115/02617aa1-989d-4d48-8f6d-d7f87a45723d.png align="center")
    
6. Commit the files with "git commit -m "Initial commit"". The -m flag lets you provide a commit message in quotes after it.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1694963598174/1ab9c6c2-2cb0-4e6a-8de1-24714de056df.png align="center")
    
7. Check the status with "git status" to see no changes waiting to be committed.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1694963623896/1152f860-17cd-4107-8896-17f50f86accd.png align="center")
    
8. View the commit history with "git log" and you should see your initial commit there.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1694963642074/82e8a4a7-7434-4c9b-ae2f-b62105497bfc.png align="center")
    
9. You now have a local Git repository with an initial commit! You can continue to add files, make changes, commit them, and push to a remote repository when ready. Let me know if you need any clarification on these steps!
