Hello CircuitDojo Dev Community,

This morning I have just gotten a personal, “base line” Zephyr app and associated driver project correctly managed under a west.yml manifest file. My demo project essentially follows Jared Wolff’s Air Quality Wing Zephyr drivers demo [https://github.com/circuitdojo/air-quality-wing-zephyr-demo](https://) directory and file layout – whew, catch my breath there! – so I am now working through errors and missing stuff at the C coding level. But the editing process is hampered. It appears that west automatically clones needed projects in a manner that those local code repos are in a “detached head state”. My git knowledge is basic at this point, but I can see this behavior in the output of west update, and also issuing git branch -a, specifically when I change current working directory to the driver project which my Zephyr based app demonstration is planned to exercise.

Is there a way to point git’s branch reference back to ‘main’ or a branch of my choosing, in a project to which I have full development and admin access on Github? I don’t expect to be able to push local edits to other parties’ projects, e.g. Zephyr, but seems like there should be a way for me to jump into a local repo of a project I posted to my own Github account. Even a repo instance that west cloned automatically.

Presently editing via Github’s web interface . . . painfully slow. Thanks ahead of time for insights the community can share on this question!

  • Ted

@tedhavelka66 I do this all the time.

If you run git remote -v within one of your modules it should give you an origin option. (where origin is the default name of your remote) If you do have a remote (which you should), you change directories to it and try a git pull or git checkout origin/name-of-branch. That will change the branch to the one you’d like to work on.

Remember, as you’ve noticed, whenever you do west update you will have to massage your checkouts as they’ll go back to manifest-rev.

    jaredwolff Thank you much, Jared, for clarifying this basic git use and interaction between git and west updates in a Zephyr based project. git's behavior is showing as expected!

      Terms and Conditions | Privacy Policy