Step 1 – Sign up for a free GitHub account
Visit the GitHub homepage and register.
- Open your web browser and go to https://github.com.
- Click Sign up.
- Enter your email, create a username and password, then complete the verification.
- Choose your plan (select the free plan) and finish the onboarding prompts.
Step 2 – Create a new repository in the browser
Use the web UI to create and initialize a repository.
- After logging in, click the + icon in the top-right corner and select New repository.
- Enter a Repository name (for example, hello-world).
- Optionally add a Description.
- Select Public or Private.
- Check Add a README file to initialize the repo.
- Click Create repository.
Step 3 – Upload files via the web interface
Drag and drop files or use the file chooser.
- In your repository, click Add file and choose Upload files.
- Drag your project files into the browser window or click choose your files.
- After uploading, scroll down to the Commit changes section.
- Enter a short Commit message (for example, “Add initial files”).
- Click Commit changes to push them to your repo.
Step 4 – View and navigate code in the browser
Explore your repository’s contents online.
- Click on file names to open and read them.
- Use the Breadcrumb navigation at the top to move between folders.
- Switch branches by clicking the branch dropdown.
Step 5 – Edit files directly in GitHub
Modify code or documentation without cloning.
- Open the file you want to change and click the ✏️ Edit button.
- Make edits in the built-in editor.
- Scroll down to the Commit changes section, add a commit message and choose Create a new branch or commit directly to main.
- Click Propose changes if using a new branch or Commit changes otherwise.
Step 6 – Collaborate using issues and pull requests
Manage tasks and code reviews online.
- Open the Issues tab to create or view tasks.
- Click New issue, enter a title and description, then Submit new issue.
- To propose code changes, open the Pull requests tab and click New pull request.
- Select the compare branch, review changes, then Create pull request.
Step 7 – Use Gists for single-file snippets
Share code snippets or single-file scripts publicly or privately.
- Click your profile icon, then select Your gists.
- Click New gist.
- Enter a Filename (for example, snippet.py).
- Paste your code into the editor.
- Choose Public or Secret, then click Create public gist or Create secret gist.
# Example: adding a new Python function
def greet(name):
print(f"Hello, {name}!")
greet("World")