First clone then fork
If you’d like to contribute to a project you’ll have to have a fork (a copy of the repository in your GitHub account) and you will also need a copy of the repository locally where you can run the code. You get this by using the git clone command.
There are two ways to do this. In my approach I first clone from the “official” repository of the project and only when I know I have something to contribute, only then I create the fork.
I have two reasons for this approach:
- I was experimenting with many projects and I was not sure if I will be able to contribute anything. So I felt there is not point in creating a fork before I need it.
- This way the original (or “official”) repo is called
originand my fork is calledforklocally. It makes more sense to me.
So my process is
git clonefrom the “official” repository.- Make some changes locally.
- When satifised create a branch locally.
- Commit the changes to the branch.
- Visit GitHub and fork the project.
- Push out the branch to the fork.
- Send a Pull-Request.