Skip navigation

Team collaboration

A guide on how to push your local code changes to a remote repository for effective team collaboration.

Overview

If you're visiting this page, you likely already have a robust test suite for your project. Now it’s time to push your code from your local machine to the remote repository so your team can collaborate effectively.

This guide assumes your remote repository URL is as below, be sure to replace this placeholder URL with the actual URL of your repository:

https://github.com/your-organization/your-repo.git

Steps

Step 1: Add your remote

Set your remote origin to point to your project repository:

git init

# Update the origin URL to your project repository
git remote add origin https://github.com/your-organization/your-repo.git

Step 2: Commit Your Changes

If you’ve made changes locally, commit them as follows:

# Stage all files for commit
git add .

# Commit with a descriptive message
git commit -m "Your commit message"

Step 3: Push to Your Remote Repository

Push your changes to the remote repository:

# Push to the remote repository
git push

Repeat step 2 and 3 when you have new changes that ready for sharing with your team members.