Git

Last Updated: 10/3/2023

Sharing Branches

  • Your branches are private or local by default.
  • If you want to collaborate with other team members using a branch, we have to explicitly push that branch.
  • The local branch must have upstream branch, means that branch should be linked to a branch in origin
git push --set-upstream origin feature/change-password
git pust -u origin feature/change-password 

View branches linked to remote

git branch --vv

See all remote tracking branches

git branch -r

Delete remote branch

git push -d origin feature/change-password

Delete local branch

git switch master
git branch -d feature/change-password