Git: Common usage scenario
- Checking out remote changes:
git clone(very first time) orgit pull(always afterward) - Editing a file:
E.g.: add a new functionattack()to theplayer.jsfile - Adding a file to "staging area" for the next commit:
git add player.js - Commit the modification to the local repository:
git commit -m "Add player attack" - Send local modifications to the remote repository:
git push - Resolution of any conflicts:
File modification and commiting again (starting from step 3)
Note! If you start a project from scratch you do
git initto create a new repository