Code Monkey home page Code Monkey logo

Comments (4)

igoropaniuk avatar igoropaniuk commented on July 17, 2024

Hi @msa2,

Actually, what I do after repo init/repo sync is just perform set up of local master branch to track remote branch master from linaro-swg/optee(choose proper remote, it's name differs in different reps) for repositories I'm going to work with. After this you can use simple git pull:

$ git checkout -b master optee/master
$ git pull

from build.

jbech-linaro avatar jbech-linaro commented on July 17, 2024

That is and has been the behavior of repo since the beginning from what I remember. The reason for that is that repo under the hood just checks out the commits (instead of branches).

Or, do you have a "recipe" for working with these gits, when you have local mods for them?

For updating my entire forest in one go, I do this (I tend to do that on daily basis since it resolves eventual inter-dependencies between gits)

# -d here, will detach from your current branch in a git and force it
# back to what is stated in manifest
# -j3 is just to run 3 jobs in parallel
$ repo sync -j3 -d

In some rare cases I don't use -d and then it will keep using my own branches that I've checked out and not the ones stated in the manifest (xml) file. But it will also try to rebase you current branch, which might not be what you want, so ... word of warning and again, that is why I most often just -d.

If do work in a git, then I just simply check it out as a new branch

$ git checkout -b my_branch
# or if I strictly want to use a certain remote/branch as base for my local branch
$ git checkout -b mybranch optee/master
# or ... if I want to use the same name as the remote and at the same time track it.
$ git checkout -t optee/master

From there you can simply use $ git pull if you want to. Personally I most of update in two steps, 1) update the remote(s) and then 2) manually rebase.

$ git remote update

Then I rebase manually if needed

# Here I'm on a local branch
$ git rebase optee/master

If you really would like to have a branch in all gits after initializing repo, then you can do:

$ repo start <mybranchname> --all

And "swish" you'll have and be on the <mybranchname> in all gits.

In fact a lot of stuff can be done directly with repo. Personally besides checking out the entire forest and syncing it using repo, I tend to do everything else directly in each git with git commands. That seems to work for me, it's not very often I get into problems with either repo nor git.

from build.

msa2 avatar msa2 commented on July 17, 2024

Thank you. I think I will now use the simple git checkout -b master optee/master approach.

The repo sync ... has a problem that if I'm working on something, I don't want to be distracted by a need to fix some merge conflicts in other parts of the system.

from build.

 avatar commented on July 17, 2024

We're closing this issue since the question has been answered. If you however feel that you have additional questions or still thinks this is an issue, please feel free to re-open the issue again.

from build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.