Results 1 to 3 of 3
Thread: Git branch and github forks
04-08-12, 09:36 AM #1
Git branch and github forks
So in working on ics for my heroc, I've decided to return to cm sources instead of the evervolv sources that the other devs like. I've been working on getting it building and I've just been using git branch, where I've branched off and made my own changes. The problem I've just realized is that I don't know how I can push these back to github as a new branch. From reading on the web it seems like I should have "forked" each repo on github first. Anyone know an easy way to push my branches to github?
I was admin/write access to the main repos if that matters.Build!.Borg!.Recruit!.Folding.for.Team.32!
Gigabyte P35-DS3R, E6300, 2x512MB Team Group DDR2 667, EVGA 7800GT Heat
Want to run the folding@home gpu client in linux? www.linuxfah.info
Your teacher is a dumbass. The equation is exact. ~Frodo Baggins
Damn....It's 12:00 AM and I thought my 805 would be a magic pumkin and turn into a conroe.........boy was I fooled:) ~Stilletto
This is what I get for not only being a newb, but also disregarding instructions! ~ShadowPho
I hate women... but im not gay lol. ~MrCrowley
Love can fade but knowledge stays forever (unless you develop alzheimers). ~Constantinos
04-08-12, 11:27 AM #2
The only reason to fork is if you don't have access to the repository; you would fork to get your own copy which you could write to, and then send pull requests to the upstream.
To add your new branch to a remote you have access to, you only need to git push -u origin branch where origin may be any remote (git remote -v to list them) and branch may be any local branch name. Once you've done it the first time with -u to create the new branch on the remote, you can just do the standard git push from then on.
Last edited by petteyg359; 04-10-12 at 12:34 AM.Gigabyte GA-X99-Ultra-Gaming - i7 5930k - 64 GiB 4-2666 - R9 Fury X 4 GiB - 10 Pro x64 / Gentoo amd64
Dell XPS 15 L502x - i7 2760QM - 16 GiB 3-1600 - GT 540M 2 GiB - 10 Pro x64 / Gentoo amd64
Sager NP8658-S - i7 6820HK - 64 GiB 4-2133 - GTX 980M 8 GiB - Gentoo amd64
[GB ≠ GiB] [MB ≠ MiB] [kB ≠ kiB] [1000 ≠ 1024] [Giga ≠ gram] [Mega ≠ milli] [Kelvin ≠ kilo] [Byte ≠ bit]
"Apparently, Plaintiff believes that he could sue an egg company for fraud for labeling a carton of 12 eggs a “dozen,” because some bakers would view a “dozen” as including 13 items." - Western Digital 2006
04-09-12, 10:45 PM #3
You will need to fork the repo on github/gitorious first if you just cloned it locally, unless you can add yourself a SSH key to that repo. If you cant add your SSH key you will want to push to your fork. After you push to your fork you can then send a "pull request" to the master repo.
If it helps any I use Eclipse with Aptana to work with GIT, seems to make things a lot easier for me.
Last edited by turbohans; 04-09-12 at 10:55 PM.This message was printed on 100% recycled electrons
email@example.com(1.380v), 16gb Corsair DDR3, Asus P8P67 Deluxe, gtx465, 3x500gb WD's
"It does not take knowledge to be genius, it takes a different way of thinking..."
And if you think about it too hard you will wonder why you did.
Build your computer Overclock it! find a cure.
Don't like looking out dirty windows? Live life without walls; Learn how to build an operating system
F@H - ExtremeOC