GitHub Essentials
Collaboration & Workflow
Preview
Push your code
gh repo create my-project --public --push\n# or, with a repo already on GitHub:\n\ngit remote add origin https://github.com/you/my-project.git\ngit push -u origin mainThe full cycle
git add .\ngit commit -m "…"\ngit pull origin main # get teammates' work first\ngit push origin mainPull vs fetch
git fetch origin # download but don't merge\ngit pull origin main # fetch + mergeClone
git clone https://github.com/someone/project.git\ncd projectGitHub features
- Profile: your repositories and contributions
- Issues: bug and feature tracking
- Pull requests: propose and review changes
- Actions: automated build and test
- README: the front page of your repo
A good README
# Project name\nShort description\n\n## Features\n- …\n\n## Installation\n```\ngit clone … && npm install\n```\n\n## Usage\n…\n\n## License\nMITTip:git pullbeforegit push, always. It keeps your local history in sync and minimises conflicts.
This is a free preview lesson
Enroll in the Git & GitHub for Beginners to unlock every lesson, lesson PDF guides, quizzes and your certificate - and start creating your own pieces today.