I have several projects on my laptop. I would like to upload all of them to GitHub and in one repository called Android-projects. After searching the web and being bombarded by different material I got confused. How can I do that? I didn't quite understand the answers found on this website. All my attempts failed.
I have GitHub Desktop and Git Shell installed on my laptop, but don't know how to use them.
Nothing much to do there:
Create an empty directory and add it to git or create a project on github and clone it to get the empty directory
Add your projects one by one to that directory and checkin
NOTE: Tracking changes will become a bit tedious with this appropriate. You will need to be careful if you are working on multiple projects at the same time.
In the main project folder where all your android projects are present, initialize a git repository there. git init
now create a repository on github.
Finally, add (push) your code to github.
Related
I'm working on AOSP, which I got from an OEM (without any CVS like Git or Repo). So I tried to get all Android projects using repo init ...
I followed all the docs but most of them talks about the AOSP mirror, How to track the Android project with repo?
Thank you.
If you have received all the source code without and VCS (Git or Repo) like say as a tarball then you cannot use the repo, and if you create manifest by yourself also it is too much work for almost no result.
Instead, create a new Git/Gerrit repository and use the same. All review and CI/CD can be done via the same.
I have an Android project composed of AOSP, and other code in an Ubuntu environment. As you know, I used git and its associated tool repo to download AOSP according to the procedures on android source site. Now I want to have a way of controlling the changes I make to the environment. I have read about Git, but perhaps not enough to know what is the best way to do this. Maybe I already have this capability just by using Git locally? So my question is: What is the best way to save state in my build environment please, and how do I save this on Github as a remote backup repository? I believe I need to have a .gitignor file to exclude object files? Basically I have a WORKING_DIRECTORY with all of my code in there. That directory has a .repo and .git directory in it.
You will find that most or all of your changes will be under certain branches. For me, I develop roms for the Nexus 9 so a lot of my changes are under device/htc/flounder. The common branch is frameworks/base/ where I also make a lot of changes.
To this end I have two separate git repos that store these:
https://github.com/seanashmore/frameworks_base
https://github.com/seanashmore/device_htc_flounder
To create these, I created a github account. Then went to each of he top level folders i.e. frameworks/base and device/htc/flounder and ran the command 'git init'. This initializes those directories as git repositories. You also need to create the repos on your github account, this will give you url's for you to 'push' your code to.
The initial push of frameworks/base will take some time as it is quite large, but once you have done that first push its very handy to keep track of your code changes and all the other benefits that git brings.
A very handy git guide can be found here: http://rogerdudler.github.io/git-guide/
If you need any more information or help just ask.
For my Android app, I need the source code for uuidlib that I would like to build as a static library and link with my native code. Another post Include uuid.h into Android NDK project mentions that the source code is available in AOSP at external/e2fsprogs/lib/uuid/ directory.
I followed the instruction on AOSP page and did a "repo init" and a "repo sync." The synchronization is still going on for the past one hour.
I am wondering if there is a better way to obtain the source code for just the library I need and not download the entire 10G of repository on my machine.
If not, what do I need to do to get uuid after "repo sync" finishes? Regards.
I am wondering if there is a better way to obtain the source code for just the library I need and not download the entire 10G of repository on my machine.
Per the repository instructions:
git clone https://android.googlesource.com/platform/external/e2fsprogs
I am working on an android project that have later to be translated to many other languages and some changes have to do in design.
Now I want to know is there any way to make one project and keep it on git and later having changes should change the git project accordingly. So is it possible to create multiple apps for Android project. If yes, is it possible with Eclipse and git or someone has any other idea?
For the time being I am saving project in local directory and copy that project to make changes for next app.
This sounds that you should give git-subtrees a try. There, you create one repo with your base project and then import this repo into your specific app project. If you want to propagate your changes to the API, you push the changes to the base repo. We use this for component development.
But from my experience: do not use eclipse for working with git. It has some major drawbacks and might corrupt the repos. Use the CLI or another tool.
I want to fork an Android project (a normal application) from the official repository. After I clone the project and import it into Eclipse, I still have loads of different missing references to some other projects that prevent me from even looking at the layout ressources (as it tells me to fix the Java errors first).
Is there a way to fix those references, without using repo or cloning the whole repository (with all its projects)? After all I’m only interested in a single standard application there.
If it is using anything that is not the official SDK, you'll have to fetch it to get it compile. You can import in Eclipse if you have the whole thing.
BTW, cloning the whole repository is worthed, because you can grep to search for things, even if you don't intend to compile it.
For changing an App that is based on the whole Android repo, you really have to have the whole repo with you. Then you can just change that App and make that App, for example using "make Email". That will only build the Email.apk and not the whole ROM.