git init
git remote -v
git remote add origin https://github.com/user/repo.git
- remotes refer to the repository
git add filepath/filename.whatever
git add -A
git commit -m "my first commit, this is the commit message that shows up on github"
git commit -am "added all files yolo and this is the commit message"
git status
git log
git push remoteName branchName
eg: git push origin master
git checkout -b newbranchname
git checkout branchName
git checkout -
git fetch remoteName
- updates all the branches for a remote, (new or deleted)
git pull remoteName branchName
- merges in all the latest code into your local repo.
- make sure you're on the same branch
e.g. git pull origin master
to get lastest changes.