header_logo
Post thumbnail
ACADEMICS

A Beginner’s Guide to GitHub Repositories and File Sharing

By Naveen Kumar

Are you getting started or want to start using GitHub but it feels intimidating? Guess what, it’s completely normal to feel that way as navigating your first repository can be pretty confusing, but it doesn’t have to be. 

This beginner-friendly guide will help you understand the essentials of creating and using GitHub repositories, from setting one up to sharing your code with others using HTTPS links. Whether you’re working solo or collaborating with a team, these simple steps will equip you to manage and share your projects with confidence. Let’s demystify GitHub, one step at a time.

Here’s a step-by-step guide for using a GitHub repository for code sharing and collaboration, including how to use GitHub HTTPS links effectively:

Table of contents


  1. 1: Using a GitHub Repository
    • Create a GitHub Repository
    • Clone the Repository Using HTTPS
    • Make Changes and Push to GitHub
    • Pull Latest Changes from GitHub
  2. Part 2: Sharing Files Using GitHub Links
    • Share Files or Code via Direct GitHub Links
    • If You Want to Share a Downloadable File:
  3. Bonus Tips
  4. Concluding Thoughts…

1: Using a GitHub Repository

1. Create a GitHub Repository

  • Go to https://github.com
  • Click on “New” or “+” > “New repository”
  • Fill in repository name, description, visibility (public/private)
  • Click Create repository

2. Clone the Repository Using HTTPS

On the GitHub repo page:

  • Click the green “Code” button
  • Copy the HTTPS link (it looks like https://github.com/username/repo-name.git)

In your terminal:

git clone https://github.com/username/repo-name.git

cd repo-name

3. Make Changes and Push to GitHub

# Make your changes, add files etc.

git add .

git commit -m “Your commit message”

git push origin main  # Or ‘master’ or whatever branch you’re using

If it’s your first time pushing, GitHub may ask for your username and personal access token (instead of a password).

4. Pull Latest Changes from GitHub

To make sure your local repo is up to date:

git pull origin main

You can copy-paste file or folder links from GitHub to share with others.

Example:

https://github.com/username/repo-name/blob/main/path/to/file.py

That link will show the file contents right in the browser.

If You Want to Share a Downloadable File:

  1. Go to the file on GitHub.
  2. Click on “Raw”
  3. Copy that URL (e.g., https://raw.githubusercontent.com/username/repo-name/main/file.txt)
  4. This URL can be used directly to download or access the raw file.

Bonus Tips

  • Use README.md in your repo to explain how to use your code/project.
  • Use branches for collaborative development.
  • Use .gitignore to avoid pushing unnecessary files.
  • You can invite collaborators directly to private repositories.

If you’re ready to go beyond the basics, check out GUVI’s Git & GitHub course—a beginner-friendly program that teaches you version control, repository management, and real-world collaboration using Git. Perfect for developers, students, and tech enthusiasts looking to master GitHub with hands-on practice and industry-relevant skills.

Concluding Thoughts…

As we conclude, I’m sure you’ve understood that GitHub isn’t just a tool—it’s a gateway to smarter collaboration and better code management. By learning how to create, clone, push, pull, and share repositories, you’ve taken the first big step toward mastering modern software workflows. 

As you grow more comfortable, you can explore features like branches, README files, and collaborator access to build cleaner, more organized projects. Good luck!

Success Stories

Did you enjoy this article?

Schedule 1:1 free counselling

Similar Articles

Loading...
Share logo Copy link
Power Packed Webinars
Free Webinar Icon
Power Packed Webinars
Subscribe now for FREE! 🔔
close
Webinar ad
Table of contents Table of contents
Table of contents Articles
Close button

  1. 1: Using a GitHub Repository
    • Create a GitHub Repository
    • Clone the Repository Using HTTPS
    • Make Changes and Push to GitHub
    • Pull Latest Changes from GitHub
  2. Part 2: Sharing Files Using GitHub Links
    • Share Files or Code via Direct GitHub Links
    • If You Want to Share a Downloadable File:
  3. Bonus Tips
  4. Concluding Thoughts…