Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4681466yYes.
This allows for the master repo to be clean and you can spin up numerous branch’s in the fork that won’t conflict with anyone else that may be using that repo later.
If you do have multiple contributors of he master repo, you just need to
Pull down from that repo regularly to prevent merge conflicts when you merge back into the master repo. -
phacus916yHum..I never thought about doing this, but, why not multiple branches in one repo? Something like
Master being the 'never commit to it' branch, a 'dev' branch in which you create your other branches?
Good question! ++ -
Condor324966yWhy would you do that? I'm not an expert in git by any means, but isn't that what branches are for? And to keep the git flow clean, you can develop in feature branches, merge said branches into e.g. dev and then remove the feature branch completely.
-
C0D4681466y@Condor @phacus
Forking allows for each developer to do what ever they like to their copy of the repo, without affecting the “master” repos history and running up 100’s of branches for “experiment/xyz”
Going with a flow that has a dev/master branch + feature / experimentals means the forked repo can be a messy hunk of crap but not ruin the main repo.
Once the dev has finished what ever they are doing they pull down from the master repo, merge into the forks dev branch for conflict resolution, and then into the master branch - for sandboxed testing, which can then be ran up to the masters dev branch.
This lets you catch merge conflicts early, do what ever you want without affecting the main repo, or contributors And control what does go up for others to have access to when working with a team. -
But there are things like local branches? So it wont clutter the repo with branches as experiment/xyz etc.
Just don't push the commits you make.
But if you work on multiple devices feel free to fork it
Is it okay for me to fork my own repo to an alt account so I can have my multi-branch repo but not have to commit everything to the production repo right away?
question