This content originally appeared on DEV Community and was authored by dtnf45
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
This content originally appeared on DEV Community and was authored by dtnf45
dtnf45 | Sciencx (2021-12-17T22:26:53+00:00) git fork vs git clone on a command line. Retrieved from https://www.scien.cx/2021/12/17/git-fork-vs-git-clone-on-a-command-line/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.