Git is a version control system. It tracks changes in your code, allows you to manage your local or remote repositories, and makes it easy to collaborate within a team. [Doc]
- Create a repository on GitHub
- Generate SSH key
- Clone the repo locally
- Use branches
- Use Git flow
- Track your work
- Keep your local and remote repositories updated
- git clone
- git add .
- git commit -m "your-work-message"
- git push
- git pull
A branch is a separate line of development. It allows you to work on new features or fixes without affecting the main codebase. The default branch is usually main
-
git checkout -b "branch-name"
-
- add: A new feature.
- change: Generic changes in the code base, anything that is related to maintaining or improving the code.
- fix: A bug fix.
- test: Adding missing tests or correcting existing tests.
It is a common Git workflow strategy where each new feature or improvement in your project gets its own separate branch
main | *---* release-1.0 \ *---* develop \ *---* feature-login *---* feature-cart- Create a new branch
- Push your work
- Open a PR with a clear title, description (add a screenshot or video), and labels
- Assign a reviewer for your code
- Review your teammate's code
- Approve the PR
- Merge the PR
- Delete the branch
- Use projects
- Use issues
- Use branch rules