Go up 🠥
Why remote repositories are necessary
Remote repositories (GitHub, GitLab, Bitbucket) are online copies of your project that provide backup, collaboration, and version history. They let you access your work from anywhere and share with teammates.
Steps for creating a project on GitHub
- Sign in to GitHub.
- Click New repository.
-
Name it (e.g.
my-first-project
) and set visibility. - (Optional) Initialize with README/.gitignore/license.
- Click Create repository.
Git commands you will often need
Create a project locally
mkdir my-first-project
cd my-first-project
git init
Link local repo to GitHub
git remote add origin https://github.com/username/my-first-project.git
git add .
git commit -m "Initial commit"
git push -u origin main
Useful everyday commands
git status
git log
git pull origin main
git push
git checkout -b feature/branch
How others can contribute
Contributors can fork/clone your repo, create branches, and open
Pull Requests for review before merging into main
.
-
Clone:
git clone https://github.com/username/project.git
-
Create branch:
git checkout -b feature/short-description
-
Commit & push:
git add .
git commit -m "Describe changes"
git push -u origin feature/short-description
- Open Pull Request on GitHub.