"Undo" git fetch (Lineage gerrit) - Android Q&A, Help & Troubleshooting

Hi Guys,
I did a git fetch from gerrit, something like:
git fetch https://review.lineageos.org/LineageOS/android_packages_apps_CustomTiles refs/changes/68/167368/2 && git checkout FETCH_HEAD
To see some changes on my PC.
Now I want to go back to what's in the master remote, basically, removing all the changes from the fetch.
Can you please help?
Thanks

Hi, any help here? Should I only do a rebase?

Related

Resync CM sources for build error

Hey,
While there were no nightlies for SGS2 I thought I would give building myself a go. I managed to churn out my first build on the same day as CM started their nightlies, but I quite like the idea of making my own. No changes to it, it is just nice to have done it myself.
After the first build, I tried to resync the git repo. Following this guide, http://teamhacksung.org/wiki/index.php/CyanogenMod10:How_to_build, I did
Code:
cd ~/android/system && repo sync -j16
all set to ./build.sh i9100,
But the repo sync keeps failing. I get this error:
Code:
repo sync -j16
Fetching projects: 100% (309/309), done.
error: Cannot remove project "device/samsung/i9100": uncommitted changes are present
commit changes, then run sync again
[email protected]:~/android/system$ sudo repo sync -j16
sudo: repo: command not found
Before I had that error, I got a similar error, but with the device/galaxys2-common directory instead. In true "i'm not really sure what I'm doing" fashion I deleted that directory in the hope that would fix it. It did not.
Could someone let me know what im doing wrong/where I'm going wrong. On Ubunutu 12.04.
Thanks

[Q] Error Of Downloading Source(TheMuppets)

I had the repository error and, It is like
[email protected]:~$ git clone git://github.com/TheMuppets/proprietary_vendor_samsung/i9300.git -b cm-10.1
Cloning into 'i9300'...
fatal: remote error:
TheMuppets/proprietary_vendor_samsung/i9300.git is not a valid repository name
Email [email protected] for help
Like This. All Is Matchin. Isn't it?
I would like to know my error's begenning. (Can You just understand, (My english is very not goooood...))
dev.ahchew said:
I had the repository error and, It is like
[email protected]:~$ git clone git://github.com/TheMuppets/proprietary_vendor_samsung/i9300.git -b cm-10.1
Cloning into 'i9300'...
fatal: remote error:
TheMuppets/proprietary_vendor_samsung/i9300.git is not a valid repository name
Email [email protected] for help
Like This. All Is Matchin. Isn't it?
I would like to know my error's begenning. (Can You just understand, (My english is very not goooood...))
Click to expand...
Click to collapse
If you go to:
https://github.com/TheMuppets/proprietary_vendor_samsung/tree/cm-10.1/i9300
And select the "git read only" button. Then press copy to clipboard, you'll find what you're actually wanting to clone is:
git://github.com/TheMuppets/proprietary_vendor_samsung.git

using repo and git after download of full Android Source Tree

Hello,
After using using repo and git to download of full Android Source Tree, can not find any of the source files like (.c, c++, .java). in the working directory
(~/android-5.1.1_r35)
below are the commands I used.
I removed outside links so it would post to the forums
Thank You
# To install Repo:
# Download the Repo tool and ensure that it is executable:
curl outside link> ~/bin/repo
chmod a+x ~/bin/repo
# Configure git with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.
git config --global user.name "Dan"
git config --global user.email "xxx"
#Using a local mirror
#When using several clients, especially in situations where bandwidth is scarce, it is better to create a local mirror of the entire server content, and to sync clients from that mirror (which requires no network access). The download for a full mirror is smaller than the download of two clients, while containing more information.
#These instructions assume that the mirror is created in /usr/local/aosp/mirror. The first step is to create and sync the mirror itself. Notice the --mirror flag, which can be specified only when creating a new client:
repo init -u outside link --mirror
repo sync
cd ~/android-5.1.1_r35
repo init -u /work/andriodsrc/androidsrc-all/platform/manifest -b android-5.1.1_r35
#A successful initialization will end with a message stating that Repo is initialized in your working directory. Your client directory should now contain a .repo directory where files such as the manifest will be kept.
#Downloading the Android Source Tree
#To pull down the Android source tree to your working directory from the repositories as specified in the default manifest, run
repo sync
#The Android source files will be located in your working directory under their project names. The initial sync operation will take an hour or more to complete. For more about repo sync and other Repo commands, see the Developing section.

Need Help with 'git Cherry-Pick' use and how it is affected on 'Repo Sync'

Hello,
I have an android repo that is init and synced to the 7.0 branch, and I have cherry picked fixes for a few projects.
My question is: if I invoke 'repo sync' does it sync back to the original init 7.0 branch without the cherry-picks for the projects? Everytime I run 'repo sync' to update my manifest, I seem to lose the cherry picked projects.
If so, how do I make my repo remember the changes I have made?
I tried 'repo start'
Code:
repo start 'my-local' --all
But that just seemed to change my original init branch to the "master" android branch, and then proceed to place the projects in to the 'my-local' branch.
https://github.com/NeoBeum/XpeRicoverE5823/tree/suzuran-7.0
Thanks
Yes, every time you execute repo sync it will sync back to original source. To keep your changes you have to fork manifest and push it to your git account. Than you have to init repo from your git fork of manifest. After that you should fork module you want to modify and charry pick commit. Push changes to your repo. Than modify manifest to download modified module from your repo instead from AOSP etc. You have to specify you remote in manifest and than repo sync. Propably you will have to force sync that particular module.
Look here, there are 3 parts: http://blog.udinic.com/2014/05/24/aosp-part-1-get-the-code-using-the-manifest-and-repo
I found a lot of useful things in that blog.
Thanks, yeah, I also got a reply from GitKraken and read how to use submodules. I also found that if you get disconnected, from the internet when doing anything git, sometimes messes up the objects.
I also realised now the reason repo has all projects, so you can make a full production build, and why it breaks when certain projects are removed... Only took 200GB of trial and error

Building AOSP using CM device files

Hello
I'm trying to build AOSP 6.0.1 using your CM device files (CM13 has been successfully built for my device, Huawei P8). I'm not too experienced with this so some help is appreciated. Right now I have synced the google repo
repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r80
cd .repo
git clone https://github.com/CM-Huawei-P8-Development/local_manifests_gra_l09
cd local_manifests_gra_l09
cd ../..
repo sync
This is where I'm now. The confusion is about am I supposed to also download or sync the device files from https://github.com/CM-Huawei-P8-Development/device_gra_l09 (the device tree)
Also is this https://github.com/CM-Huawei-P8-Development/kernel needed to be downloaded separately? I see in the hwgra-l09-dev.xml file that the repos are indeed listed but will it also work for AOSP?
I'm following a guide for Sony device and it says that next I'm supposed to
source build/envsetup.sh && lunch <--- here something device specific maybe?
and
make –j 8
What am I missing ?

Categories

Resources