3

git fork vs git clone on a command line

 2 years ago
source link: https://dev.to/dtnf45/git-fork-vs-git-clone-on-a-command-line-562
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
dtnf45

Posted on Dec 17

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK