DEV Community 👩‍💻👨‍💻

dtnf45
dtnf45

Posted on

git fork vs git clone on a command line

Whats the difference between a fork and a clone?

fork: you are creating a copy of the repository using your github id (if you are using github). If you create changes it the forked repository, you have to create a pull request to the original repository

technically fork is not a git command. So you will have to use something that is available on Github, GitLab etc..

If you are using Github. First install gh. Eg. on a mac

brew install gh

To login:

gh auth login --web

To fork a repo: E.g to fork Netflix Conductor repo

gh repo fork https://github.com/Netflix/conductor.git --clone

clone Cloning a repo will create a local copy on our computer so that it can sync between both the local and remote locations of the repo. Cloning is good when you want to get your own copy of a repository where you may not be contributing to the original project.

To clone:

git clone https://github.com/Netflix/conductor.git

Top comments (0)

The Complete Guide to Full Stack Web3 Development

The most important tools, protocols, and frameworks for building full stack web3 apps, and most importantly - how to put everything together to lay the groundwork for building out any of your own ideas in the future.