Creating My First GitHub Repository! 🚀
Published: 2023-03-26 15:50:36

---
title: Creating My First GitHub Repository! 🚀
published: true
date: 2023-01-22 06:13:53 UTC
tags: 
canonical_url: https://theamazingatharva.hashnode.dev/creating-my-first-github-repository
---

Hey Guys!!!

My name is [Atharva](https://twitter.com/atharvas_twt) and I am a high school student, interested in the world of development. This blog is a part of the " **Open Source" track**. In this blog, I will be sharing how I made my first ever (small-scale) repository on GitHub and how you can make your repository as you learn more things and are ready for the outside world.

Link to my repository: https://github.com/the-amazing-atharva/Hello-World-Program

### Some Snippets :

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1673505043087/24498865-58cf-4651-8419-a92268391561.jpeg)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1673505069130/256a398a-958a-4756-b167-2e3f90f77ba1.jpeg)

But before we begin, make sure you have a GitHub account and Git Bash installed on your computer. If you don't have one, you can easily create an account on [**GitHub.com**](http://GitHub.com) and download Git Bash [**here**](https://git-scm.com/downloads).

**Let's Begin!!!**

## Let's start by creating our first C++ program :

1. Open your favourite text editor and create a new file called "hello.cpp".

2. Type the following code into the file:

```
#include <iostream>

int main() {
    std::cout << "Hello, World!" << std::endl;
    return 0;
}

```

1. Save the file in a directory of your choice.

2. This will be the location of your local repository.

### Snippet :

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1673505105176/a6f2b479-553a-4b3f-b71c-966c1a3d5d68.jpeg)

## Adding it to Github :

1. Open Git Bash in the same directory as the "hello.cpp" file.

2. Initialize a new local repository by running the command :

```
$ git init

```

1. Add the "hello.cpp" file to the repository by running the command :

```
$ git add hello.cpp

```

1. Commit the changes with a commit message by running the command :

```
$ git commit -m "Initial commit: Hello World program"

```

1. Now that our code is ready in our local repository, let's share it with the world by creating a new repository on GitHub.

2. Go to your GitHub account, and create a new repository.

3. Once the repository is created, you'll be provided with instructions on how to link your local repository with the remote repository on GitHub.

```
$ git remote add origin https://github.com/yourusername/helloworld.git
$ git push -u origin master

```

And that's it! Your "Hello, World!" program is now live on GitHub! 🚀

Share the link to your repository with your friends and other developers or beginners and the world. Show off your first-ever GitHub repository and let the world know that you're on your way to becoming a C++ pro! 💻

## Advantages of Creating Repositories on GitHub :

1. **Version control:** GitHub allows you to track changes to your code over time, making it easy to collaborate with others and roll back to previous versions of your code if needed.

2. **Collaboration:** GitHub makes it easy to collaborate with others on projects by allowing multiple users to work on the same codebase at the same time, and track changes made by each user.

3. **Backup:** GitHub provides a secure and reliable backup of your code, so you don't have to worry about losing your work due to a computer crash or other technical issues.

4. **Open-source contributions:** GitHub is a popular platform for open-source software development, allowing developers to easily contribute to open-source projects and share their open-source projects with the community.

5. **Showcasing your work:** GitHub allows you to create a portfolio of your work and share it with others, which can be useful when looking for a job or seeking to collaborate with other developers.

6. **Learning:** GitHub is a great place to find and learn from other developers and their code. Many developers share their work on GitHub, allowing you to learn new skills, techniques and best practices.

7. **Community Support:** Having your code on GitHub means you can get support from the open-source community, which can help you to improve your code and overcome bugs, and also you can offer your help and support to others.

8. **Accessibility:** GitHub makes it easy for anyone to access your code from anywhere in the world.

9. **Bug tracking:** GitHub provides built-in issue-tracking features that allow you to track and manage bugs, feature requests and other tasks related to your code. This makes it easy to keep track of what needs to be done and who is working on it.

10. **Integration:** GitHub provides APIs and webhooks that allow you to integrate it with other tools like automated testing, code quality analysis, and deployment tools. This can streamline your development process and make it more efficient.

In short, GitHub is a comprehensive platform that offers a variety of features and tools to benefit developers, whether they are working alone or as part of a team. It offers everything necessary for efficient code management and collaboration, including version control, backup, open-source contributions, showcasing your work, learning, community support, accessibility, code review, continuous integration and deployment, bug tracking and many more features for developers to manage code and collaborate.

## Learnings :

As you can see, creating and sharing a GitHub repository is a simple process. With a little bit of practice, you'll be able to create and share your projects with ease. And remember, the more you share your code, the more feedback you'll receive, and the more opportunities you'll have to collaborate with other developers. So don't be shy, and share your work with the world.

Happy coding! 🚀💻🌎

## Conclusion :

In conclusion, GitHub is a great platform for developers to share their code and collaborate with others. By creating a repository and sharing your first C++ program, you're on your way to building a portfolio of your work and demonstrating your skills to potential employers or collaborators.

With a little bit of practice, you'll be able to create and share your projects with ease.

**_Share your code, get feedback, and let the world see your work!_**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1673592412001/1f0d7885-3849-4e33-b5c0-fda9cd34e477.gif?auto=format,compress&gif-q=60&format=webm)

### Liked This Blog?

Do react and comment with your thoughts on the points discussed above.

Make sure to follow me :

1. 💻 [**Twitter**](https://twitter.com/atharvas_twt)

2. 📚 [**Hashnode**](https://theamazingatharva.hashnode.dev/)

3. 🎉 [**Medium**](https://medium.com/@atharvasalitriwrites)

4. 📝 [**GitHub**](https://github.com/the-amazing-atharva)

5. 🔥 [**LinkedIn**](https://www.linkedin.com/in/atharva-salitri-89342a25b/)