[Q]Upload a project to GitHub - General Questions and Answers

Hello guys, I wanted to add my project on GitHub so everyone can see it but i don't know if i am doing everything right.
this is mt project tree
Code:
~/name_of_the_project_folder/project_files
I created a repository on GitHub with the same name of my project and i want to put in there my project's files and that's how i'm doing it
Code:
$ cd ~/name_of_the_project_folder
$ git init
$ git add .
$ git commit -m "first commit"
$ git remote add origin [email protected]:blablabla
$ git push origin master
are these steps right?
One more question, 2 days ago i followe these steps but at 98% of the uploading project the terminal gave my a problem that was something like "maximum size reached" or something like that. My project weights about 7Gb, could you guys give me some directions on how to upload something like this? thanks in advance

matt95 said:
Hello guys, I wanted to add my project on GitHub so everyone can see it but i don't know if i am doing everything right.
this is mt project tree
Code:
~/name_of_the_project_folder/project_files
I created a repository on GitHub with the same name of my project and i want to put in there my project's files and that's how i'm doing it
Code:
$ cd ~/name_of_the_project_folder
$ git init
$ git add .
$ git commit -m "first commit"
$ git remote add origin [email protected]:blablabla
$ git push origin master
are these steps right?
One more question, 2 days ago i followe these steps but at 98% of the uploading project the terminal gave my a problem that was something like "maximum size reached" or something like that. My project weights about 7Gb, could you guys give me some directions on how to upload something like this? thanks in advance
Click to expand...
Click to collapse
You can try to clone it first and then copy the content, commit and push. That's a little nooby way, but works
Also if your project is so big, you should consider dividing it into some smaller parts and push.
Good luck.

eagleeyetom said:
You can try to clone it first and then copy the content, commit and push. That's a little nooby way, but works
Also if your project is so big, you should consider dividing it into some smaller parts and push.
Good luck.
Click to expand...
Click to collapse
thanks for the info, yeah i'm totally new to github that's why

Related

Android SDK source code

I wish to have the source code of Android SDK to get a better idea of how certain features/aspects work especially the ones that are not well documented . i really dont wish to get into all the trouble of setting up a CVS especially after looking at the steps here (http://source.android.com/download).
So anyone kind enough willing to send me a zipped one ? i want it the latest 1.5 SDK.
Thanks in advance for helping me out.
gonna have to be the one that tells you this, and i mean no disrespect by what i say
if you are too lazy to set something up in order to do something then you probably shouldn't be doing it. people are willing to help you get it set up, but you are gonna have to do it yourself unless you find some extremely kind soul to get it for you. personally i would like to recompile the cource code for cupcake to make my own build(include my favorite apps) but i don't feel like setting it up so i know i am SOL
No one will help you until you can learn to help yourself. We're not here to do your work for you. You can google just as well as we can. So get up and get it for yourself.
If you just want to download a couple of files, or you only want to be looking at files, you can do it easily without installing git on your computer by using the gitweb interface:
http://android.git.kernel.org/
Do you have eyes? Can you read?
Installing Repo
Repo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see Using Repo and Git.
To install, initialize, and configure Repo, follow these steps:
1. Make sure you have a ~/bin directory in your home directory, and check to be sure that this bin directory is in your path:
$ cd ~
$ mkdir bin
$ echo $PATH
2. Download the repo script and make sure it is executable:
$ curl http://android.git.kernel.org/repo >~/bin/repo
$ chmod a+x ~/bin/repo
Initializing a Repo client
1. Create an empty directory to hold your working files:
$ mkdir mydroid
$ cd mydroid
2. Run repo init to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest:
$ repo init -u git://android.git.kernel.org/platform/manifest.git
* If you would like to check out a branch other than "master", specify it with -b, like:
$ repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake
3. When prompted, configure Repo with your real name and email address. If you plan to submit code, use an email address that is associated with a Google account.
A successful initialization will end with a message such as
repo initialized in /mydroid
Your client directory should now contain a .repo directory where files such as the manifest will be kept.
What will my name and email be used for?
To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account (which does not have to be a Gmail address). Make sure this is a live address at which you can receive messages. The real name that you provide here will show up in attributions for your code submissions.
What is a manifest file?
The Android source files are divided among a number of different repositories. A manifest file contains a mapping of where the files from these repositories will be placed within your working directory when you synchronize your files.
Getting the files
To pull down files to your working directory from the repositories as specified in the default manifest, run
$ repo sync
For more about repo sync and other Repo commands, see Using Repo and Git.
The Android source files will be located in your working directory under their project names.
Click to expand...
Click to collapse
Condensed. Type the following:
$ curl http://android.git.kernel.org/repo >~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir mydroid
$ cd mydroid
$ repo init -u git://android.git.kernel.org/platform/manifest.git
$ repo sync
Click to expand...
Click to collapse
Now exactly how hard is it to do that?
hanged_man said:
I wish to have the source code of Android SDK to get a better idea of how certain features/aspects work especially the ones that are not well documented . i really dont wish to get into all the trouble of setting up a CVS especially after looking at the steps here (http://source.android.com/download).
So anyone kind enough willing to send me a zipped one ? i want it the latest 1.5 SDK.
Thanks in advance for helping me out.
Click to expand...
Click to collapse
@jashsu
Thanks, ive used the git browser a lot but i wish to have the source in my IDE for quicker and easier navigation.
@everyone who replied to me
All of you has misunderstood me, im not being lazy or anything, it's just that google has provided steps for linux and mac users and im a windows user.
Im not asking for anyone to do it for me, i should have been clear in my request, does anyone have it ? im pretty sure that lots of developers has done it before and willing to aid me on this one. Come on people, i expected you to be a bit more welcoming than this.
On windows you have a couple of options. You could just setup a linux VM and follow the process above quite easily. That is what I do. You can even copy the sources back to your windows host if you prefer that. Or you can give it a try by installing cygwin on windows. You might be able to at least checkout the sources. I haven't tried the cygwin setup so I can't be 100% sure if it works.
... OR, you can quit being a ***** and install a proper OS. Or at least install GIT, which comes with BASH and can run the script in exactly the same manner.
lbcoder said:
... OR, you can quit being a ***** and install a proper OS. Or at least install GIT, which comes with BASH and can run the script in exactly the same manner.
Click to expand...
Click to collapse
lol true that
lbcoder said:
... OR, you can quit being a ***** and install a proper OS. Or at least install GIT, which comes with BASH and can run the script in exactly the same manner.
Click to expand...
Click to collapse
ohhh you got me there. Your imaginary girlfriend is probably proud of you after beating me with that genius phrase.
Now people, installing linux on my machine or running it on a vm then following all these instructions and using these tools is a long tedious process that will take lot of time, it's just a source code for god's sake and not launching a spaceship, i was hoping for a gentleman to help me on this (who already has the source the code checked out) and willing to send it to me. that's all.
Thanks everyone for your time.
here's what i see, you joined this forum in hopes of just getting spoonfed, we don't like to spoon feed. setting up a VM takes about an hour including install time of the OS on the VM and setting up linux on your machine takes about 45 minutes. linux is a much better operating system ESPECIALLY if you want to develop for android because android is UNIX based and uses UNIX commands. it's not that hard to get the source code yourself, hell you could even just get a linux live cd and use that to get the source code, then just copy it to your windows drive.
this thread needs to be locked because this person is disrespecting everyone on these forums by asking us to do the work for him.
All you need is Git, no new os or anything. There is a Git client for Windows. Download that, then:
open command prompt.
cd to whereever you want to download the data to
git clone git://android.git.kernel.org + project path.
Sit back and wait.
zer0day said:
All you need is Git, no new os or anything. There is a Git client for Windows. Download that, then:
open command prompt.
cd to whereever you want to download the data to
git clone git://android.git.kernel.org + project path.
Sit back and wait.
Click to expand...
Click to collapse
Yup 0day is right.
By the way, while I would agree that Linux is the best platform to work on Android, I think overly antagonistic comments like "... OR, you can quit being a ***** and install a proper OS." do more harm than benefit for the FOSS movement. Just my $0.02

[Q] Best way to cherry pick changes from the CyanogenMod code review?

So I set up a chain of scripts to build, package, and deploy CyanogenMod kang builds on Ubuntu 11.04 according to the guide in this thread: http://forum.xda-developers.com/showthread.php?t=1067519
Now that I can successfully build CyanogenMod, I'm wondering what the best (quickest, easiest, etc.) way is to cherry pick changes from the CyanogenMod code review which is found here: http://review.cyanogenmod.com/#q,statuspen,n,z
For example, if I wanted to allow the user to choose whether or not to show the "Hold" button in calls, I would need to pull this change: http://review.cyanogenmod.com/#change,6104. What would be the best way of doing this?
Thanks in advance for any help!
When I try to use the git cherry-pick command found on the commit page, I get this error: "fatal: You do not have a valid HEAD"
hmmm I would
Code:
cd android/system/packages/apps/Phone/
and then do
Code:
git pull http://review.cyanogenmod.com/p/CyanogenMod/android_packages_apps_Phone refs/changes/04/6104/1
but I'm pretty new on this too.
I've been building from source for a couple of weeks now and just finished my first kernel from source but I'm having problems pulling commits.
Whenever I try to pull or cherry-pick I get
Code:
fatal: Not a git repository (or any of the parent directories): .git
Were you actually able to pull the commit? I'm doing this from android/system. Should I be in a different folder?
Try this little tutorial. ^_~
http://forum.xda-developers.com/showpost.php?p=23527685&postcount=29
The important part that I was missing was to be in the correct directory based on the patch.
For instance
Code:
cyanogenmod dot com/p/CyanogenMod/android_packages_apps_Phone refs/changes/04/6104/1
would have to be in android/packages/apps/Phone
and
Code:
cyanogenmod dot com/p/CyanogenMod/android_frameworks_base refs/changes/29/11129/8 && git checkout FETCH_HEAD
would be in android/frameworks/base
Thanks for the help on this

Cherry-Picking From Github

how do i cherry pick a single commit from a github source? like get a certain commit from aokps settings app and get it into cm10.1
i tried this and seemed to break my build
cd ~/android/system/frameworks/base
git fetch https://github.com/AOKP/packages_apps_Settings.git && cherry-pick 8b7e06fe63939730067b539ca7343fcd8e68ad01 FETCH_HEAD
is that the right way to do it? and how do i know if it cherry picked correctly? sorry im still getting the hang of thins with github
azoller1 said:
how do i cherry pick a single commit from a github source? like get a certain commit from aokps settings app and get it into cm10.1
i tried this and seemed to break my build
cd ~/android/system/frameworks/base
git fetch https://github.com/AOKP/packages_apps_Settings.git && cherry-pick 8b7e06fe63939730067b539ca7343fcd8e68ad01 FETCH_HEAD
is that the right way to do it? and how do i know if it cherry picked correctly? sorry im still getting the hang of thins with github
Click to expand...
Click to collapse
I'd go to their gerrit. Anything and find what you want.
http://gerrit.sudoservers.com/#/q/status:open,n,z
Click on it, note the Project listed. cd to that in your tree. then in the download section you see a cherry-pick tab. click that and select the command there. That is the command you use. If it comes in without needing to merge anything you are good.
thanks, and how would i know if merging is needed?
azoller1 said:
thanks, and how would i know if merging is needed?
Click to expand...
Click to collapse
it'll tell you. Not sure if you use UI or command line but in command line i installed vimdiff, then set it as git mergetool with,
git config --global merge.tool vimdiff
if using UI I'd use meld.
so it'll report something needs to be merged then just
git mergetool and it'll open up. manually fix the merge
then
git status
This will show you the .orig files. delete them
Then:
git add -A
git commit -a
Control+X(nano) or :wq (vim)
And you're done.
git remote add -f repo.git then git cherry pick commit id
so basically just get the branch i want a cherry pick from, then picks it from the branch when i enter the commit, and i need to cd in the right directory before doing
git remote add -f repo.git?
see if it help!http://forum.xda-developers.com/showthread.php?p=23527685#post23527685
yeah i saw that guide, but still confused using github, gerrit is pretty easy
I always use this thingy as reference for cherry-picking:
http://stackoverflow.com/questions/...ctively-pull-merge-changes-from-anothers-fork
sorry forgot about this i will give a better example. if you want tp cherry pick a framwork base commit be in the framework folder then
git remote add paranoid(name is irrlefvent) -f [email protected]aranoidAndroid/android_frameworks_base.git
wait for it to download
then git cherry pick the commit id: git cherry pick f9cedfe79cc1d545b920f93539a0843d02819fe6
FYI, if you are looking at a specific commit on github, you can get it in patch format by adding .patch to the URL.
For example:
https://github.com/CyanogenMod/andr...mmit/e8ba824b16a3575d9a4c5d85dce6d3800970d093
becomes
https://github.com/CyanogenMod/andr...8ba824b16a3575d9a4c5d85dce6d3800970d093.patch
If you download that .patch file, it can be applied using:
Code:
git am <patchfile>.patch
FYI, on your own machine, if you want to export such a patch for distribution, use
Code:
git format-patch
For example:
Code:
git format-patch HEAD~3
Would output the last 3 patches you committed in "git am" committable form.
FYI, this is why any developer who tells you that releasing source code for test kernels is not feasible is full of BS. It's understandable that you don't want to push test commits to a public repo, but it's perfectly feasible to meet the requirements of the GPL by providing formatted patches.
As an example: http://forum.xda-developers.com/showpost.php?p=22925793&postcount=339
Entropy512 said:
FYI, if you are looking at a specific commit on github, you can get it in patch format by adding .patch to the URL.
For example:
https://github.com/CyanogenMod/andr...mmit/e8ba824b16a3575d9a4c5d85dce6d3800970d093
becomes
https://github.com/CyanogenMod/andr...8ba824b16a3575d9a4c5d85dce6d3800970d093.patch
If you download that .patch file, it can be applied using:
Code:
git am <patchfile>.patch
FYI, on your own machine, if you want to export such a patch for distribution, use
Code:
git format-patch
For example:
Code:
git format-patch HEAD~3
Would output the last 3 patches you committed in "git am" committable form.
FYI, this is why any developer who tells you that releasing source code for test kernels is not feasible is full of BS. It's understandable that you don't want to push test commits to a public repo, but it's perfectly feasible to meet the requirements of the GPL by providing formatted patches.
As an example: http://forum.xda-developers.com/showpost.php?p=22925793&postcount=339
Click to expand...
Click to collapse
If using this method to patch, which folder in my source do I download the patch to? Also when adding commits to my source do I need to add every single commit individually or can I just choose the commit from the major header? For example there are many commits within the Frameworks folder (Frameworks/Base..etc) do I need to go into the Frameworks folder and add each element individually or can I just add the commit from the Frameworks folder? One more thing, how to I apply a patch that I have downloaded as xxx.patch? Sorry if this is hard to understand I'm new at this and still learning the jargon.
Thanks!
The truth is already out there: http://wiki.cyanogenmod.org/w/After_You_Build
http://wiki.cyanogenmod.org/w/Doc:_...building_a_patch_submission_already_on_Gerrit
Sent from my Nexus 7 using xda premium
i want this commit: https://github.com/CyanogenMod/andr...mmit/d1f1fb4064bfcef528a12a4c5176df7b44ffd48c
you need two things, the url to the main project and the commit id, both you just copy out of your browser
the branch i always use is called "jellybean"
my remote to my git is called "github"
that might differ from your configuration-
cd aosp
cd packages/app/Settings
git checkout jellybean
git remote add cyan https://github.com/CyanogenMod/android_packages_apps_Settings
git fetch cyan
git cherry-pick d1f1fb4064bfcef528a12a4c5176df7b44ffd48c
done.
in case it conflicts, you run:
grep -r "<< HEAD" .
and fix all the files it spits out. search for "<< HEAD" in these files and you should see what to do.
when you're done fixing your files you can test if it builds, if it does you go:
git add --all
git commit --all
in the end you push it up to your git
git push github jellybean
Entropy512 said:
FYI, if you are looking at a specific commit on github, you can get it in patch format by adding .patch to the URL.
For example:
https://github.com/CyanogenMod/andr...mmit/e8ba824b16a3575d9a4c5d85dce6d3800970d093
becomes
https://github.com/CyanogenMod/andr...8ba824b16a3575d9a4c5d85dce6d3800970d093.patch
If you download that .patch file, it can be applied using:
Code:
git am <patchfile>.patch
FYI, on your own machine, if you want to export such a patch for distribution, use
Code:
git format-patch
For example:
Code:
git format-patch HEAD~3
Would output the last 3 patches you committed in "git am" committable form.
FYI, this is why any developer who tells you that releasing source code for test kernels is not feasible is full of BS. It's understandable that you don't want to push test commits to a public repo, but it's perfectly feasible to meet the requirements of the GPL by providing formatted patches.
As an example: http://forum.xda-developers.com/showpost.php?p=22925793&postcount=339
Click to expand...
Click to collapse
i think this is the easiest way to pick a commit from someone and add it into your own source, but instead i used this command line in my root source
patch -p1 < ./patch
seems to fail a lot when adding the patch but its really easy to fix it
Entropy512 said:
FYI, if you are looking at a specific commit on github, you can get it in patch format by adding .patch to the URL.
For example:
https://github.com/CyanogenMod/andr...mmit/e8ba824b16a3575d9a4c5d85dce6d3800970d093
becomes
https://github.com/CyanogenMod/andr...8ba824b16a3575d9a4c5d85dce6d3800970d093.patch
If you download that .patch file, it can be applied using:
Code:
git am <patchfile>.patch
FYI, on your own machine, if you want to export such a patch for distribution, use
Code:
git format-patch
For example:
Code:
git format-patch HEAD~3
Would output the last 3 patches you committed in "git am" committable form.
FYI, this is why any developer who tells you that releasing source code for test kernels is not feasible is full of BS. It's understandable that you don't want to push test commits to a public repo, but it's perfectly feasible to meet the requirements of the GPL by providing formatted patches.
As an example: http://forum.xda-developers.com/showpost.php?p=22925793&postcount=339
Click to expand...
Click to collapse
FYI, you use a lot of `FYI` in your post lol.
Sent from my Nexus 7 using Tapatalk 4

[Script] repo-mm: gerrit-mirror.sh - Gerrit project mirroring script [06/30/2013]

Hello xda,
I had a little time on my hands the other night, and wanted to figure out a way that I could work on any of the project repositories needed to build say, aokp, cyanogenmod, aosp, etc... without having to connect to the internet.
Mirroring is not new. Simple enough to:
Code:
mkdir cm-mirror
cd cm-mirror
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1 --mirror
repo sync -j[dl-jobs]
then create a working directory:
Code:
cd ..
mkdir cm-work
cd cm-work
repo init -u file:///Volumes/Android/cm-mirror/CyanogenMod/android.git --reference /Volumes/Android/cm-mirror/ -b cm-10.1
repo sync # no jobs needed. super fast.
But at this point you only have what you need for cm-10.1. What if you also have work you are doing for 10.1.0? Or an old update to make for cm-7.2.0?
I originally started looking for a solution to sync every branch in the manifest one at a time, but while talking with cdesai he showed me a really clean way of getting the repositories directly from gerrit.
Anyways, here is the resulting script. Let me know your thoughts.
I've moved the script to a git repository here: https://github.com/bhundven/repo-mm
in case anyone wants to contribute.
I've also written a post on my blog about using the new gerrit-mirror.sh on gh.
ChangeLog
Changes:
[06/30/13]: Announce some updates to gerrit-mirror.sh, and blog post.
[06/24/13]: Moved gist to github project.
GitHub for repo-mm.

[Q]Repo Instructions for JFLTE 5.x?

I know that Jake had to step away from the project, and I pretty much intend on running my jfltetmo into the ground, so I'll be on jflte long-term. I'd like to start giving back to the community by seeing if I can pick up where Jake left off. I'm an electrical engineer with plenty of programming experience. I just don't have much in the embedded world. I saw that Jake had some work posted to Github on the 5.1 branch for jflte, but when I follow the directions in omnirom's Github Readme, I get an error of
error: Cannot fetch android_device_samsung_jflte
Can I manually copy the files, and where do they fit within the android structure?
Is Android Studio a good IDE for ROM development?
uagent said:
I know that Jake had to step away from the project, and I pretty much intend on running my jfltetmo into the ground, so I'll be on jflte long-term. I'd like to start giving back to the community by seeing if I can pick up where Jake left off. I'm an electrical engineer with plenty of programming experience. I just don't have much in the embedded world. I saw that Jake had some work posted to Github on the 5.1 branch for jflte, but when I follow the directions in omnirom's Github Readme, I get an error of
error: Cannot fetch android_device_samsung_jflte
Can I manually copy the files, and where do they fit within the android structure?
Is Android Studio a good IDE for ROM development?
Click to expand...
Click to collapse
Hmm, post the full error log? Also, if the branch is only in Jake's personal repos you may need to use a custom local manifest to use that for the device tree instead of Omni's jflte device tree.
I personally just use grep + emacs, I've never been much of an IDE person.
Entropy512 said:
Hmm, post the full error log? Also, if the branch is only in Jake's personal repos you may need to use a custom local manifest to use that for the device tree instead of Omni's jflte device tree.
I personally just use grep + emacs, I've never been much of an IDE person.
Click to expand...
Click to collapse
Hi, thanks for getting back to me! I deleted the directory and reinitialized the omni repo. Here is the error I keep getting, it seems to be choking on arm/linux/androideabi:
repo sync -j8 -f --no-clone-bundle|tee >> reposynclog.txt 2>&1
Fetching projects: 100% (480/480), done.
Syncing work tree: 93% (447/480) error: in `sync -j8 -f --no-clone-bundle`: [Errno 2] No such file or directory: u'/media/rhill/25e87ad3-e539-4009-9c40-0ab4db81d8e0/rhill/WORKING_DIRECTORY/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/.git/HEAD'
error: manifest missing or unreadable -- please run init
I re-ran
Code:
repo init -u git://github.com/omnirom/android.git -b android-5.1 > repoinitlog.txt 2>&1
Which doesn't seem to have thrown any errors at me, but I keep returning to the same broken package, even when I just run repo sync, with no options.

Categories

Resources