Skip to main content

Python print() Function

When you start learning Python, one of the first things you need to learn is how to display information on the screen. For example, you might want to display: A welcome message. Your name and age. The result of a mathematical calculation. Student marks and results. Information generated by a Python program. Python provides a built-in function called print() for displaying information. The print() function is one of the simplest and most frequently used functions in Python. It helps programmers display information while testing programs, solving problems, and developing applications. In this article, we will learn how to use print() with practical examples and their outputs. 1. What Is the print() Function in Python? The print() function is a built-in Python function that displays information in the output area, usually the terminal or console. Let's look at a simple example. print("Hello, World!") Output: Hello, World! In this example, Python displays the text Hello,...

How to Upload Files to a GitHub Repository Without Using Git

If you're new to GitHub, you might think that uploading files always requires learning Git commands like git add, git commit, and git push.

The good news is that it doesn't.

GitHub provides a simple web interface that allows you to upload, create, edit, rename, and delete files directly from your browser—without installing Git or using the command line.

This is especially useful for beginners, students, and anyone working on small projects or documentation.

In this article, you'll learn how to manage your repository using only the GitHub website.


Why Upload Files Without Git?

Many beginners haven't learned Git yet, but they still want to:

  • Upload college projects

  • Store programming files

  • Share documents

  • Create portfolios

  • Practice using GitHub

The GitHub website makes these tasks simple.

However, for larger software projects or frequent updates, using Git is generally more efficient.


Before You Begin

Make sure you have:

  • A GitHub account

  • A repository (Public or Private)

  • Files stored on your computer

Example project:

Student-Management-System/

│── Main.java

│── Student.java

│── README.md

└── images/

We'll upload these files to GitHub.


Step 1: Sign In to GitHub

Open your web browser and visit:

https://github.com

Sign in using your GitHub account.


Step 2: Open Your Repository

Click your profile picture.

Select Your repositories.

Choose the repository where you want to upload files.

Example:

Student-Management-System

The repository homepage will open.


Step 3: Click "Add File"

On the repository page, locate the Add file button.

Click it.

You'll see two options:

  • Create new file

  • Upload files

Choose Upload files.


Step 4: Select Your Files

You can now:

  • Drag and drop files into the browser.

  • Click Choose your files and browse your computer.

Example:

Main.java

Student.java

README.md

GitHub will begin uploading them.


Step 5: Review Uploaded Files

After uploading, GitHub displays the list of selected files.

Check that:

  • All required files are present.

  • File names are correct.

  • No unnecessary files have been included.

Taking a moment to review your upload helps prevent mistakes.


Step 6: Add a Commit Message

Before saving your changes, GitHub asks for a commit message.

A commit message briefly describes what you've changed.

Examples:

Initial project upload
Added Java source files
Updated project documentation

Avoid vague messages like:

Update

or

Changes

A clear commit message makes it easier to understand the history of your project.


Step 7: Commit the Changes

Click Commit changes.

GitHub will upload your files and save them in the repository.

Congratulations!

Your files are now stored safely on GitHub.


Viewing Uploaded Files

After the upload is complete, the repository may look like this:

Student-Management-System/

├── Main.java

├── Student.java

├── README.md

└── images/

Anyone with access to the repository can now view these files.


How to Create a New File

GitHub also allows you to create files directly from the browser.

Steps:

  1. Open your repository.

  2. Click Add file.

  3. Select Create new file.

Enter a file name.

Example:

notes.txt

GitHub opens an online editor where you can type your content.

After writing the file:

  • Add a commit message.

  • Click Commit changes.

The new file is immediately added to the repository.


How to Create a Folder

GitHub doesn't have a separate "Create Folder" button.

Instead, folders are created automatically when you include a folder name in the file path.

Example:

docs/installation.md

GitHub creates:

docs/

└── installation.md

Similarly,

images/logo.png

creates:

images/

└── logo.png

Folders exist because they contain files.


How to Edit a File

Suppose you want to correct a spelling mistake in your README.

Steps:

  1. Open the file.

  2. Click the Edit (pencil) icon.

  3. Make your changes.

  4. Add a commit message.

Example:

Updated installation instructions
  1. Click Commit changes.

Your changes are saved instantly.


How to Rename a File

GitHub allows you to rename files through the web interface.

Open the file.

Click the Edit button.

Change the file name at the top.

Example:

Before:

Program.txt

After:

JavaProgram.txt

Commit the changes.

The file is renamed.


How to Delete a File

To remove a file:

  1. Open the file.

  2. Click the Delete (trash can) icon.

  3. Add a commit message.

Example:

Removed old documentation

Click Commit changes.

The file is permanently removed from the repository.


Uploading Multiple Files

GitHub allows you to upload multiple files at once.

Example:

Main.java

Student.java

Teacher.java

README.md

LICENSE

pom.xml

Uploading related files together helps keep your project organized.


Uploading Images

You can upload images just like any other file.

Examples:

logo.png

banner.jpg

dashboard.png

Images are useful for:

  • README files

  • Documentation

  • Project screenshots

  • User guides


Uploading PDFs

GitHub also supports PDF files.

Examples:

ProjectReport.pdf

UserGuide.pdf

Assignment.pdf

This is useful for sharing reports and documentation alongside your code.


File Size Considerations

GitHub is designed for source code and project files.

Very large files may not be suitable for regular repositories.

If your project includes large media assets or datasets, consider using appropriate storage solutions designed for large files.


Best Practices

Keep Your Repository Organized

Instead of placing everything in one location:

Project/

Main.java

Student.java

Image1.png

Image2.png

Report.pdf

Organize your project:

Project/

├── src/

├── images/

├── docs/

├── README.md

└── LICENSE

A clear structure makes projects easier to maintain.


Write Meaningful Commit Messages

Good examples:

Added login page
Updated README
Fixed calculator bug

Clear messages make the project history easier to understand.


Upload Only Necessary Files

Avoid uploading:

  • Temporary files

  • Cache files

  • Build outputs

  • Personal notes unrelated to the project

Keeping your repository clean improves readability.


Common Beginner Mistakes

Uploading the Wrong Folder

Double-check that you're uploading the correct project.

Many beginners accidentally upload old versions.


Forgetting the README

A repository without a README gives visitors little information about the project.

Always include one when possible.


Using Poor Commit Messages

Messages like:

Update

don't explain what changed.

Be specific whenever possible.


Uploading Sensitive Information

Never upload:

  • Passwords

  • API keys

  • Database credentials

  • Personal information

Once committed to a repository, sensitive information can be difficult to remove completely from its history.


Frequently Asked Questions (FAQs)

Can I upload files without installing Git?

Yes.

GitHub's web interface lets you upload and manage files directly from your browser.


Can I edit code online?

Yes.

GitHub includes a built-in editor that allows you to modify files and save changes directly.


Can I upload an entire project folder?

Yes.

When selecting files to upload, you can upload a complete project structure, preserving folders and files.


Is this method suitable for large projects?

For small projects and learning, the web interface works well.

For larger projects with frequent updates, most developers prefer using Git or GitHub Desktop.


Summary

GitHub's web interface makes it easy to upload and manage project files without using Git commands. You can create files, edit documents, organize folders, upload images, rename files, and delete content—all from your browser.

This approach is perfect for beginners who want to become comfortable with GitHub before learning more advanced workflows.

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...