Git and GitHub Documentation

What is Git?

Git is a version control system. That means it keeps track of changes you make to files over time. Instead of saving multiple copies like “portfolio_v2” or “final_final_reallyfinal,” Git records every change in a timeline called commits.

This lets you:

  1. Go back to older versions
  2. See what changed and when
  3. Work safely without losing progress
  4. Create branches to test new ideas

Git runs through the command line, and you use short commands to save and upload your work.

What is GitHub?

GitHub is a website that stores Git repositories online.

It acts like:

  1. A backup of your work
  2. A place to share your projects
  3. A way to publish websites
  4. A portfolio host for employers

GitHub and Git work together: Git tracks your changes, and GitHub stores them online.

How I Uploaded My Portfolio Using Git

I uploaded my portfolio site to GitHub using Git commands. Here’s the process I followed:

  1. I opened Command Prompt and navigated to my portfolio folder using cd "C:\Users\kylie\OneDrive\Music\Documents\html\site".
  2. I turned my folder into a Git repository with git init.
  3. I added all my files using git add --all.
  4. I saved my first commit with git commit -m "Initial portfolio upload".
  5. I created a new GitHub repository called my-portfolio.
  6. I connected my local folder to GitHub using git remote add origin https://github.com/kylielvong/my-portfolio.git.
  7. I pushed my portfolio online with git branch -M main and git push -u origin main.

Branches I Used

For this upload, I used the main branch only. If I need to test new features later, I can create a branch like git checkout -b new-feature to experiment safely.

GitHub Repository

View my portfolio repository on GitHub

Screenshots

Here are screenshots showing the commands I used and my GitHub repository:

Screenshot of Git commands Screenshot of GitHub repository