Git Basic Commands

June Chung
Nov 23, 2020

--

Standard process
git status
git add .
git commit -m “new change”
git push [repository name]

How to push to branch
git status
lets you check which branch you’re on
git branch OR git branch --list
git branch june
git checkout june

How to pull ONLY a branch repo
git clone -b june <repo url>

If there is no “REMOTE” repository but have “local” repository
will get error that there is no upstream branch
git push --set-upstream origin[repositoryname] june

How to check origin (=remote branch)
git remote -v
git remote set-url origin new.git.url/here

--

--