php - How to share git branches that are based on same repository? -


i novice programmer, , new github. collaborating colleague on project has been working on over years.

so far:

he created repository , loaded initial files. forked account, work on separately.

now:

how can make commit repository , share him, can check out changes , incorporate them repository if likes changes?

i know there lot of information on github, i'm not sure start. appreciated.

there many ways this, github recommends pull requests , unless have no push access repository need or send patches. there example of such workflow here

git clone git@github.com:<their repo> [optional folder name] cd reponame (or optional folder name) 

if repository has submodules

git submodule update --init (if repo has submodules) git submodule foreach 'git checkout <their working branch>' 

fork code. fork specific repository plan work on. give own copy of project. set git in repository plan work on.

cd <repo dir or optional 1 chosen) git remote set-url origin git@github.com:<your github name>/<your repo>.git git remote add --track next upstream git://github.com/<their github name>/<their repo>.git 

that repository set code. can git pull, git push, etc. (this to/from fork). pull in changes branch of partner repo, do:

git pull upstream branch 

you not able git push repo, need pull request.

when happy go github (your project) , select diff , pull request. allows put in message , lib maintainer message attend request. show if pull request merge cleanly, unlikely accepted if maintainer has fix code.


Comments