Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • jQuery
  • AngularJS
  • ReactJS
  • Next.js
  • React Native
  • NodeJS
  • Express.js
  • MongoDB
  • MERN Stack
  • PHP
  • WordPress
  • Bootstrap
  • Tailwind
  • CSS Frameworks
  • JS Frameworks
  • Web Development
Open In App
Next Article:
How to Change the Visibility of the GitHub Repository?
Next article icon

How to Change the Visibility of the GitHub Repository?

Last Updated : 14 Jun, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

GitHub repositories can be either public or private, depending on your preferences and requirements. Public repositories are accessible to everyone, allowing anyone to view and contribute to the code, while private repositories are restricted to specific collaborators. Changing the visibility of a repository is a simple process that can be done through the GitHub web interface. This article will guide you through the steps to change the visibility of your GitHub repository.

Why Change Repository Visibility?

  • Privacy: Protect sensitive code and information by making a repository private.
  • Collaboration: Open up your project to the community by making a repository public.
  • Control: Manage who can see and contribute to your project by adjusting its visibility.

Approach 1: At the time of the creation of the repository

In order to change the visibility of the repository at the time of creation, follow the steps depicted below with visual aids as follows:

Step 1: In the repository section, select new to create a new repository. 

Step 2: After filling in the details choose the visibility.

Step 3: Click on the create repository option.

Approach 2: After the creation of the repository

Step 1: Choose the repository, select the settings option from the header.

Step 2 :Scroll to the end of the page up to Danger Zone, in this danger zone, select the change visibility option 

Step 3: Choose the visibility you want.

With the usage of these two approaches we can change the visibility of the repository.

Considerations When Changing Repository Visibility

1. Impact on Collaborators

  • Public to Private: If you change a public repository to private, only current collaborators will retain access. You might need to invite additional collaborators manually.
  • Private to Public: Changing a private repository to public makes it accessible to anyone on the internet. Ensure that no sensitive information is present in the repository before making it public.

2. Impact on Forks

  • Public to Private: If a public repository is forked before being made private, the forks will remain public.
  • Private to Public: Once a private repository is made public, it can be forked by anyone.

3. Billing Considerations

  • Private repositories are generally a paid feature on GitHub, depending on your account type and plan. Ensure you have the appropriate plan if you intend to maintain multiple private repositories.

Best Practices

1. Regularly Review Repository Visibility

Periodically review your repositories' visibility settings to ensure they align with your current needs and collaboration goals.

2. Audit Repository Content Before Changing Visibility

Before making a private repository public, audit its contents to ensure that no sensitive information or proprietary code is exposed.

3. Communicate with Collaborators

Inform your collaborators of any changes to the repository's visibility to avoid confusion and ensure they have the necessary access.


Next Article
How to Change the Visibility of the GitHub Repository?

A

anuragsingh1022
Improve
Article Tags :
  • Web Technologies
  • Git
  • GitHub

Similar Reads

    How to Change the URI For a Remote Git Repository?
    Git is a distributed version control system that helps manage source code history. Sometimes, you may need to change the URI (URL) of a remote repository, for instance, when migrating to a new host or changing from HTTP to SSH. Here’s how you can accomplish this task. Changing the URI for a remote G
    2 min read
    How To Change The Remote Repository For Git Submodule?
    Git submodule allows to include a Git repository as a subdirectory within another Git repository. This is useful to manage dependencies or keep separate components of a project in their own repositories. But, there may be times when we need to change the remote repository that a submodule points to.
    4 min read
    How to Show All the Branches in a GitHub Repository?
    In this article, we'll understand the concept of branches in Git and learn how to show them using different methods. Git, a version control system, is designed to track changes in software development projects. Additionally, GitHub serves as a platform to host these projects online and facilitates c
    2 min read
    How To Change The Root Folder Of Your Git Repo?
    Changing the root folder of your Git repository involves moving the .git directory to a new location and ensuring that your project's files are in the correct structure relative to this new root.To change the root folder of your Git repository, you essentially need to move the .git directory to the
    1 min read
    How to Add Code on GitHub Repository?
    GitHub is a powerful platform for hosting and sharing code. Whether you’re working on a solo project or collaborating with others, adding code to a GitHub repository is essential. Here’s a step-by-step guide on how to add your code to a GitHub repository. Steps to Add Code on GitHub RepositoryStep 1
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences