- Start your day:
git pull- Get latest changes
- Make changes:
- Edit files
- Test your code
- Commit frequently:
git status- See what changedgit diff- Review changesgit add <files>- Stage changesgit commit -m "Clear message- Commit
- Push regularly:
git push- Upload to GitHub- Push at least once per session
- **Before finishing: **
git status- Ensure nothing is uncommittedgit pushFinal push of the day
git fetch- Download info about changes (doesn't apply them)git pull- Download AND apply changes (fecth & merge)git push- Upload your commits to GitHubgit status- Check current stategit diff- See unstaged changesgit log --onelineView commit history
- Pull before you start workin
- Commit often with clear messages
- Push frequently to back up work
- Always pull before pushing if working with others
- Use
git statusliberally -it's your friend!