Skip to content

Latest commit

Β 

History

History
61 lines (44 loc) Β· 1.07 KB

File metadata and controls

61 lines (44 loc) Β· 1.07 KB

Git Pull & Push Tutorial

This guide explains how to pull (download) and push (upload) changes to a GitHub repository using Git Bash or any terminal with Git installed.


πŸ“₯ Pulling Changes

1. Clone the repository (if you haven't yet)

git clone https://github.com/your-username/your-repo.git
cd your-repo

2. Pull the latest changes from the remote

git pull origin main

πŸ“€ Pushing Changes

1. Make your changes in the project directory

2. Stage the changes

git add .

3. Commit the changes

git commit -m "Describe what you changed"

4. Push to GitHub

git push origin main

Again, replace main with your actual branch name.


πŸ” Check Your Git Config

To ensure Git is using your correct identity:

git config --global user.name
git config --global user.email

To set them:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

βœ… Done!

You have now pulled and pushed changes using Git. Happy coding!