Skip to main content

Python type() Function

When learning Python, you will work with different types of data, such as numbers, text, decimal values, and Boolean values. Python provides several built-in functions to help you work with these data types. One of the most useful functions is the type() function . The type() function tells you the data type of a value or variable. It helps you understand what kind of data Python is working with and can make debugging your programs easier. For example, consider these variables: age = 20 price = 99.50 name = "Rahul" is_student = True Although all four variables store data, their data types are different. Python allows us to check these types using type() . Let's understand how it works with simple examples. 1. What Is the type() Function in Python? The type() function is a built-in Python function that returns information about the type of an object. In beginner-level programming, you can use it to check whether a value is an integer, a floating-point number, a string,...

GitHub Stars, Watch, and Fork Explained

When you visit any GitHub repository, you'll notice three important buttons near the top of the page:

  • ⭐ Star

  • πŸ‘€ Watch

  • 🍴 Fork

Many beginners assume these buttons perform similar functions, but each one serves a completely different purpose.

Understanding when to Star, Watch, or Fork a repository will help you use GitHub more effectively, especially when exploring open-source projects and collaborating with other developers.

In this guide, we'll explain each feature in detail with practical examples and real-world scenarios.


What are Stars, Watch, and Fork?

These three features allow you to interact with repositories in different ways.

FeaturePurpose
⭐ StarSave or show appreciation for a repository
πŸ‘€ WatchReceive notifications about repository activity
🍴 ForkCreate your own copy of a repository

Although they appear together, they solve different problems.


Understanding the Repository Header

When you open a repository, you'll usually see something like this:

Student-Management-System

⭐ Star      πŸ‘€ Watch      🍴 Fork

Each button has a different function.

Let's explore them one by one.


What is a GitHub Star?

A Star is similar to bookmarking or liking a repository.

When you star a repository:

  • It is added to your starred repositories.

  • You can easily find it later.

  • The repository owner sees that someone appreciated the project.

  • The total star count increases by one.

Starring does not download the project or create a copy of it.


Real-Life Analogy for Stars

Imagine visiting a library.

You find a programming book that you really like.

Instead of borrowing it immediately, you place it in your "Favorites" list so you can find it later.

A GitHub Star works in the same way.


When Should You Star a Repository?

You can star a repository when:

  • You want to study it later.

  • You find it useful.

  • You appreciate the developer's work.

  • You want to recommend it to others.

  • You don't want to lose track of it.

Many developers use Stars as a personal bookmark collection.


Example

Suppose you find this repository:

Java-DSA-Tutorial

You're currently learning Java and want to return to it later.

Simply click:

⭐ Star

The repository is now saved in your starred list.


Can You Remove a Star?

Yes.

Click the Starred button again.

GitHub removes the repository from your starred repositories.

There is no limit to how many repositories you can star.


What is Watch?

Watching a repository means you're interested in its ongoing development.

When you watch a repository, GitHub sends notifications about important activities.

Examples include:

  • New Issues

  • Pull Requests

  • Discussions

  • Releases

  • Security alerts

Watching helps you stay informed about project updates.


Real-Life Analogy for Watch

Imagine subscribing to a YouTube channel.

Whenever a new video is uploaded, you receive a notification.

Watching a GitHub repository works similarly.

Instead of videos, you receive updates about the project.


Watch Options

GitHub offers different notification preferences.

Depending on the repository and your settings, you may see options such as:

  • Not Watching – You won't receive notifications unless you're directly involved.

  • Watching – You'll receive notifications for most repository activity.

  • Custom – You can choose which types of events generate notifications.

This flexibility allows you to avoid unnecessary notifications.


When Should You Watch a Repository?

Watching is useful when:

  • You're contributing to the project.

  • You're waiting for new releases.

  • You're following an active open-source project.

  • You're interested in project discussions.

  • You want updates about bug fixes or new features.

For repositories you're only casually interested in, starring is usually sufficient.


What is a Fork?

A Fork creates your own copy of another person's repository under your GitHub account.

The original repository remains unchanged.

Your fork is completely separate, allowing you to:

  • Experiment freely

  • Add new features

  • Fix bugs

  • Practice coding

  • Contribute changes back to the original project

Forking is one of the most important features in open-source development.


Real-Life Analogy for Fork

Imagine your teacher gives every student a copy of the same assignment.

Each student writes their own answers on their own copy.

No student's work affects another student's copy.

A GitHub Fork works the same way.

You receive your own copy of the repository to modify independently.


Fork Workflow

The basic workflow looks like this:

Original Repository

        │
        ▼

Click Fork

        │
        ▼

Your GitHub Account

        │
        ▼

Your Copy of the Repository

You can edit your copy without affecting the original project.


Example

Suppose you discover this repository:

Portfolio-Website

You want to customize it for yourself.

Instead of changing the original project, click:

🍴 Fork

GitHub creates:

yourusername/

Portfolio-Website

Now you own a copy that you can modify as much as you like.


Does Forking Affect the Original Repository?

No.

The original repository remains unchanged.

Only your copy is modified when you make changes.

If you later want the project maintainers to review your improvements, you can submit a Pull Request (which we'll cover in a future article).


Star vs Watch vs Fork

FeatureStarWatchFork
Saves Repository✔✖✔ (your own copy)
Receives Notifications✖✔Optional
Creates a Copy✖✖✔
Supports Contributions✖✖✔
Shows Appreciation✔✖✖
Best ForBookmarkingFollowing updatesMaking changes

Which One Should Beginners Use?

If you're just starting with GitHub:

  • ⭐ Star repositories you find useful.

  • πŸ‘€ Watch repositories you're actively following.

  • 🍴 Fork repositories when you want to experiment or contribute.

You don't need to fork every interesting repository.


Common Beginner Mistakes

Confusing Star with Fork

Starring only bookmarks a repository.

It does not create a personal copy.


Watching Too Many Repositories

Watching hundreds of repositories can generate many notifications.

Only watch projects you're genuinely interested in following.


Forking Unnecessarily

If you only want to read code or save a repository, starring is enough.

Fork only when you intend to modify the project or contribute to it.


Thinking Fork Means Collaboration

Forking alone does not contribute changes to the original repository.

To propose changes, you must submit a Pull Request after making modifications.


Frequently Asked Questions (FAQs)

Can I star my own repository?

Yes.

Although many developers don't do this, GitHub allows you to star your own repositories.


Can I fork a private repository?

Generally, you can only fork private repositories under specific permissions and organizational policies. Public repositories are the most common repositories to fork.


Will the repository owner know I starred their project?

Yes.

Your star contributes to the repository's public star count, and your profile may appear among users who starred the repository.


Can I delete a fork?

Yes.

A fork is just another repository under your account.

You can delete it at any time from the repository settings.


Does starring download the project?

No.

Starring simply bookmarks the repository on GitHub.


Best Practices

  • Star repositories that you want to revisit.

  • Watch repositories that you're actively following or contributing to.

  • Fork repositories only when you plan to modify or contribute to them.

  • Avoid watching too many repositories to keep notifications manageable.

  • Explore popular starred repositories to discover high-quality open-source projects.


Summary

Although Star, Watch, and Fork appear together on every GitHub repository, they serve completely different purposes.

A Star lets you bookmark and appreciate a repository. Watch keeps you informed about project activity through notifications. Fork creates your own copy of a repository so you can experiment, customize, or contribute without affecting the original project.

Knowing when to use each feature will help you navigate GitHub more confidently and participate effectively in the open-source community.

Comments

Popular posts from this blog

Understanding Comments in Java: A Beginner’s Guide

When learning Java programming, one of the first concepts you’ll come across is comments . Comments may not affect how a program runs, but they play a crucial role in making code more understandable, readable, and maintainable. Let’s dive deeper into what comments are, why they’re important, and the different types of comments in Java. What are Comments in Java? A comment in Java is a piece of text written within a program that is ignored by the compiler . In other words, comments are notes for humans, not instructions for machines. They help developers explain the purpose of code, describe logic, or temporarily disable certain lines of code without deleting them. Why are Comments Important? πŸ“Œ Readability – Comments make code easier to understand for you and others. πŸ“Œ Maintenance – When you revisit your code after months, comments remind you what you were doing. πŸ“Œ Collaboration – In team projects, comments explain code to fellow developers. πŸ“Œ Debugging – You c...

Java Program to Check Voting Eligibility

In this program, we’ll take the user’s age as input and check whether the person is eligible to vote or not. In India, the minimum age required to vote is 18 years . πŸ’» Program Code // Java Program to Check Voting Eligibility import java.util.Scanner; public class VotingEligibility { public static void main(String[] args) { // Create Scanner object to take input from user Scanner sc = new Scanner(System.in); // Ask user to enter age System.out.print("Enter your age: "); int age = sc.nextInt(); // Check eligibility if (age >= 18) { System.out.println("You are eligible to vote."); } else { System.out.println("You are not eligible to vote yet."); System.out.println("You can vote after " + (18 - age) + " year(s)."); } sc.close(); // Close the scanner } } 🧠 Explanation import java.util.Scanner; → Imp...

Java Program to Calculate Total Marks and Average of Five Subjects

πŸ’‘ Program Explanation In this program: The user will input marks of five subjects . The program will calculate the total marks and average . It will then display both results clearly. πŸ§‘‍πŸ’» Java Code: // Java Program to Calculate Total Marks and Average of Five Subjects import java.util.Scanner; // Importing Scanner class for user input public class TotalAndAverage { public static void main(String[] args) { // Creating Scanner object to take input from user Scanner sc = new Scanner(System.in); // Declaring variables for five subjects double subject1, subject2, subject3, subject4, subject5; // Taking marks input for each subject System.out.print("Enter marks of Subject 1: "); subject1 = sc.nextDouble(); System.out.print("Enter marks of Subject 2: "); subject2 = sc.nextDouble(); System.out.print("Enter marks of Subject 3: "); subject3 = sc.nextDo...