Git Fork vs Git Clone

preview_player
Показать описание
Okay, you forked a repo and made your changes, now what? In this video we explain what you can do to contribute to the original repository and become a good contributor! Feat. @ThePrimeTimeagen

Timestamps:

00:00 Why should I fork instead of cloning?
00:22 Prime's Workflow
00:53 Upstream and why it's useful
01:17 What you should do before making a PR

Like & subscribe for the algo if you enjoyed the video!
Рекомендации по теме
Комментарии
Автор

This was useful, I didn’t knew we can add multiple upstreams!


You learn everyday! Soo true!!

therealslimaddy
Автор

I think its important to note that another big motivator for using fork vs clone, is if you're working on open source or not. If you're working at a company, its generally expected that you'd clone the repo and create branches on that repo. You can of course fork it (if you're using github/similar git servers), but your branches will be on your fork, not the upstream, which can be an issue for collaborating on a branch. e.g. just the other day I was doing some pair programming in a repo, so we both commited changes to our feature branch on the upstream repo that we both have cloned.

I think it would have been good to clarify that "git fork" is not a command to avoid confusion (since the title contains "git clone" which is a command) since its not a git feature but a github feature (a feature most other big git servers implement I think anyways).

Metruzanca
Автор

What if you just want to make a version of it for yourself but still have access to latest updates? Doesn't quite fit the description here but still seems like a valid reason to fork.

atetraxx
Автор

I think my previous comment was removed. But I was asking for clarification. Once we go git add remote upstream. Is there a step in between where we do a git checkout -b? Or is it fine to just do merge

NobleAbsinthe