CodeAlchemy
Jotting one man's journey through software development, programming, and technology
Project maintained by pablogarciaprado
Hosted on GitHub Pages — Theme by mattgraham
◀️ Home
GitHub
Fork
Forking a repository serves as a way to create your own copy of someone else’s project on GitHub (or similar platforms), enabling you to make changes independently of the original project, keeping the original repository untouched.
Purposes of Forking:
- Contributing to the Original Project:
-
Forking allows you to experiment, fix bugs, or add features without affecting the original repository.
-
Once your changes are ready, you can submit them for inclusion in the original project via a pull request.
- Customizing a Project:
- If you want to use a repository as a base and adapt it to your specific needs, forking provides a personal copy that you can freely modify.
- Backing Up or Archiving:
- Forking creates a personal, independent snapshot of the original repository, preserving it even if the original project is removed or changed.
- Learning and Experimentation:
- Forking lets you explore the codebase, learn new concepts, and experiment with changes in a safe environment.
Contributing to a project
- Fork the repository
- Create a new branch
- Option 1: old version
git checkout -b feature/your-feature-name
- Option 2: new version (recommended)
git switch -c <new_branch_name>
- Make your changes
- Commit your changes
git commit -m "Add your commit message"
- Push to the branch
git push origin feature/your-feature-name
- Create a pull request