Contribute to an existing repository


Tue Nov 29 2022 16:09:47 GMT+0000 (UTC)

Saved by @chelobotix #contributeto an existing repository #github

# download a repository on GitHub to our machine
# Replace `owner/repo` with the owner and name of the repository to clone
git clone

# change into the `repo` directory
cd repo

# create a new branch to store any new changes
git branch my-branch

# switch to that branch (line of development)
git checkout my-branch

# make changes, for example, edit `` and `` using the text editor

# stage the changed files
git add

# take a snapshot of the staging area (anything that's been added)
git commit -m "my snapshot"

# push changes to github
git push --set-upstream origin my-branch

Contribute to an existing repository