Setting up GitHub & GitHub Desktop

Setting up GitHub & GitHub Desktop

1. Creating a GitHub Account

  1. Go to https://github.com.
  2. Click Sign up.
  3. Enter your email, create a username and password.
  4. Choose the free plan.
  5. Verify your email address.

2. Installing GitHub Desktop

  1. Visit https://desktop.github.com.
  2. Click Download for [your OS].
  3. Install the application by following the setup instructions.
  4. Open GitHub Desktop and sign in using your GitHub account.

3. Creating a Repository

A repository (or “repo”) is like a folder for your project.

Using GitHub Website

  1. After logging in, click the + icon in the top-right corner.
  2. Select New repository.
  3. Name your repository (e.g., my-first-project).
  4. Optionally add a description.
  5. Choose Public or Private.
  6. Check Add a README file.
  7. Click Create repository.

4. Cloning a Repository in GitHub Desktop

Cloning means copying the repository to your computer.

  1. Open GitHub Desktop.
  2. Click File > Clone repository.
  3. Select the repository you just created.
  4. Choose a local path (where it will be saved on your computer).
  5. Click Clone.

5. Making Changes and Committing

A commit is like saving a snapshot of your work.

  1. Open the folder on your computer and edit or add files.
  2. Go back to GitHub Desktop.
  3. You’ll see your changes listed.
  4. Write a summary of what you changed.
  5. Click Commit to main.

6. Pushing Commits to GitHub

Pushing sends your commits from your computer to GitHub online.

  1. After committing, click Push origin in GitHub Desktop.
  2. Your changes are now live on GitHub.

7. Fetching and Pulling Changes

These actions help you stay up to date with changes made online or by others.

  • Fetch checks for changes on GitHub but doesn’t apply them.
  • Pull downloads and applies changes from GitHub to your local copy.

To do this:

  1. Click Repository > Fetch origin to check for updates.
  2. If there are changes, click Pull origin to get them.

Leave a Reply

No comments to show.