Skip to main content

Command Palette

Search for a command to run...

Creating and Managing Repositories

Updated
2 min read
Creating and Managing Repositories
I

I am passionate about technology, a pharmacist and a passionate advocate for public health. I firmly believe that leveraging technology is pivotal in advancing healthcare and ensuring its accessibility to all individuals.

When I am not immersed in the activities stated above, I find solace in indulging in life's simple pleasures. Reading captivating books, watching thought-provoking movies, and cherishing invaluable moments with loved ones are among the many ways I find joy outside of my professional pursuits.

Read, follow and leave a comment ❤️

Welcome back to our 9-day GitHub tutorial! After getting acquainted with the basics on Day 1, we're diving into the heart of GitHub—creating and managing repositories.

Understanding Repositories: The Core of Collaboration

In the GitHub universe, a repository, often referred to as a repo, is the central space where your project lives. It houses your code, files, and project history, and it's where collaboration and version control come to life.

1. Creating a New Repository on GitHub:

- Navigate to your GitHub profile.

- Click on the '+' icon in the top right corner and select 'New repository.'

- Name your repository, add a description, and choose initialization options.

- Click 'Create repository.'

2. Initializing a Local Repository:

- Open your terminal or command prompt.

- Navigate to the directory where you want to initialize a repository.

- Use the command `git init` to create a new Git repository.

3. Adding Files to the Repository:

- Create or copy your project files into the local repository.

- Use `git add .` to stage all changes for the next commit.

4. Committing Changes and Pushing to GitHub:

- Commit your changes locally with `git commit -m "Your commit message"`.

- Push your changes to GitHub using `git push origin main` (replace 'main' with your branch name).

5. Cloning an Existing Repository:

- Find a repository on GitHub that you want to work on.

- Click 'Code' and copy the repository URL.

- In your terminal, use `git clone [repository URL]` to create a local copy.

Why Repositories Matter:

1. Collaboration:

Repositories enable seamless collaboration among team members. Everyone can contribute to the same codebase.

2. Version Control:

Each commit represents a snapshot of your project at a specific point in time, allowing you to track changes and revert if needed.

3. Organization:

Repositories help organize your work, making it easier to manage files, track issues, and coordinate tasks.

Challenge for the Day:

Create a new repository on GitHub, initialize a local repository, add some sample files, commit changes, and push them to GitHub. Bonus points for cloning an existing repository and making a pull request!

Closing Thoughts:

Repositories lie at the core of GitHub's collaborative power. By mastering repository creation and management, you're setting the foundation for effective and organized collaboration. Next, we'll delve into the world of branching and merging—essential skills for collaborative development. Happy coding! 🚀

I

Thank you 🙏

If she is interested in acquiring a skill, you could encourage and provide her with the support she will need throughout the journey.

There are amazing supportive online communities for women in tech that provide training, resources and opportunities, some include She Code Africa and Femcode Africa for those in Africa.

Please encourage her to reach out for more information

I
Idris2y ago

I would love my wife to be like you. Any advice for her?

More from this blog

Untitled Publication

14 posts