Skip to content

GitHub clone and Working with commands

Chamudi R Wijesekera edited this page Jul 20, 2021 · 2 revisions

GitHub Clone

git clone <url>

Check all local and remote branches

git branch -a

Remove origin branches that were deleted remotely

git remote prune origin
git fetch --prune

Fetch and pull from remote

git fetch
git pull

Create a new branch and switch to it

git checkout -b <branchname>

After doing the changes,

Stage changes

git add <filename.type>

commit the changes

git commit -m "<comment>"

Push the changes to remote

git push