- From the directory, open a terminal and run the following commands:
git add --all
git commit -m "commit message, a description explaining why a particular change was made"
git push origin [branch]
for example, if you want to push to the master branch:
git push origin master
- Clone the online repository to the current directory
git clone [url]
- Pull changes from a brnach
git pull origin [branch]
- To see all the changes, or to see on which branch your are
git status
- To change to a different (must commit all changes before switching to a different branch):
git checkout [branch]
Create it from GitHub, then clone it on your machine. If you have exsisting files, copy and paste them inside the cloned repository. Then do git push ...
An easy way to do it is by deleting the repository on the computer (delete the folder) and reclone it again.
Easier to do it from GitHub, create a branch there, and pull the changes using git pull ...
Follow this link. It shows you how to utilize GitHub and how to effectively use it for team work.