← Back to team overview

kicad-developers team mailing list archive

Re: Git noob question

 

This depends on which remote your local repo is linked to.  I keep two
completely separate repos.  One directly linked to the main kicad repo.
I use this one for patch merges and very minor changes.  The result of
`git remote -v` for this repo looks like this:

origin  git+ssh://stambaughw@xxxxxxxxxxxxxxxxx/kicad (fetch)
origin  git+ssh://stambaughw@xxxxxxxxxxxxxxxxx/kicad (push)

>From this repo I always push from the local master branch directly to
the main kicad repo on launchpad using `git push`

The output of `git remote -v of my personal development repo looks like
this:

origin
git+ssh://stambaughw@xxxxxxxxxxxxxxxxx/~stambaughw/kicad/+git/kicad-dev
(fetch)
origin
git+ssh://stambaughw@xxxxxxxxxxxxxxxxx/~stambaughw/kicad/+git/kicad-dev
(push)
upstream        git+ssh://stambaughw@xxxxxxxxxxxxxxxxx/kicad (fetch)
upstream        git+ssh://stambaughw@xxxxxxxxxxxxxxxxx/kicad (push)

When I do a `git push` from local master, it gets pushed to my public
repo on launchpad[1] rather than the main kicad repo.  If I want to push
to the main kicad repo, I do a `git push upstream master`.  If I want to
sync this repo with the main kicad repo I run `git pull upstream
master`.  I can add any number of remotes to this repo so I can pull
other developers work for testing and comment without creating yet
another repo.  This repo will often have two or three other remotes.
This is what I will do to test your v6 changes.

[1]: https://code.launchpad.net/~stambaughw/kicad/+git/kicad-dev

On 3/2/2018 4:16 PM, Jeff Young wrote:
> OK, I followed Seth’s recipe so I’m now “right-side-up”.  (5.0 on
> master; 6.0 on a branch)
> 
> But I still don’t want to do a general push (as that will copy all my
> branches), right?
> 
> So I do a:
> 
> git push origin master
> 
> right?
> 
> Next question, when it asks for my launchpad username, what’s it looking
> for?  (My “launchpad id” is “jeyjey”, but when I change my password it
> sends me to Ubuntu.One and suggests “jeff@xxxxxxxxx
> <mailto:jeff@xxxxxxxxx>”.  Neither one seems to work from git.)
> 
> Thanks,
> Jeff
> 
> 
>> On 2 Mar 2018, at 21:09, Wayne Stambaugh <stambaughw@xxxxxxxxx
>> <mailto:stambaughw@xxxxxxxxx>> wrote:
>>
>> Jeff,
>>
>> Please remember no v6 stuff until the stable 5 version is released and
>> branched.  If you muck it up, I can always overwrite it with the last
>> valid commit.
>>
>> Cheers,
>>
>> Wayne
>>
>> On 03/02/2018 04:03 PM, Seth Hillbrand wrote:
>>> Jeff-
>>> As a fellow refuge from centralized VCSs, I sympathize.  It took me a
>>> while to learn to love git branch but it is your friend.
>>> Here's a quick way to get into the layout Wayne was recommending:
>>> git checkout master (you are now in your branch that has all the V6
>>> stuff)
>>> git checkout -b v6_updates (you have now created and checked out a
>>> new branch with your V6 mods)
>>> git checkout master (back to master again)
>>> git reset --hard upstream/master (This discards all of your changes
>>> to the master branch and puts you back in line with launchpad's master)
>>> After this, you will have a v6_updates branch with your V6 changes
>>> and a clean master branch.  When you are ready to create a new
>>> feature, you just `git checkout -b new_feature_branch` and go.
>>> -S
>>> 2018-03-02 12:48 GMT-08:00 Jon Evans <jon@xxxxxxxxxxxxx
>>> <mailto:jon@xxxxxxxxxxxxx> <mailto:jon@xxxxxxxxxxxxx>>:
>>>    (to make this last point easier, you can configure git to
>>>    automatically rebase when you do `git pull` :
>>>    https://stevenharman.net/git-pull-with-automatic-rebase
>>>    <https://stevenharman.net/git-pull-with-automatic-rebase> )
>>>    On Fri, Mar 2, 2018 at 3:46 PM, Wayne Stambaugh
>>>    <stambaughw@xxxxxxxxx <mailto:stambaughw@xxxxxxxxx>
>>> <mailto:stambaughw@xxxxxxxxx>> wrote:
>>>        Jeff,
>>>        On 03/02/2018 03:28 PM, Jeff Young wrote:
>>>            Before I go and make a hash of everything, can someone
>>>            please validate the following.
>>>            I have a bunch of 6.0 work on my master.
>>>        Making changes to master is risky unless you doing a simple bug
>>>        fix but even then I work in a separate branch then merge into
>>>        master before I push.  You should be using a new branch at a
>>>        minimum.  Better yet, a branch per feature that you keep up to
>>>        date with the upstream master so they merge cleanly.
>>>            I have a 5.0stable branch that I use for 5.0.
>>>            If I want to push changes for RC2, I’d do:
>>>            git push origin 5.0stable:master
>>>        As long as origin is linked to the main launchpad repo, you can
>>>        just do a `git push`.  If it's not linked to master than you run
>>>        `git push repo_name master` where repo name is what ever you
>>>        named with the `git remote` command.  You can check your remote
>>>        links using `git remote -v`.  Make sure you rebase you changes
>>>        against upstream so we don't have all of you branch/merge info
>>>        in the main repo.
>>>        Wayne
>>>            Is that right?
>>>            Thanks,
>>>            Jeff.
>>>            _______________________________________________
>>>            Mailing list: https://launchpad.net/~kicad-developers
>>>            <https://launchpad.net/~kicad-developers>
>>>            Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>            <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>            Unsubscribe : https://launchpad.net/~kicad-developers
>>>            <https://launchpad.net/~kicad-developers>
>>>            More help   : https://help.launchpad.net/ListHelp
>>>            <https://help.launchpad.net/ListHelp>
>>>        _______________________________________________
>>>        Mailing list: https://launchpad.net/~kicad-developers
>>>        <https://launchpad.net/~kicad-developers>
>>>        Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>        <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>        Unsubscribe : https://launchpad.net/~kicad-developers
>>>        <https://launchpad.net/~kicad-developers>
>>>        More help   : https://help.launchpad.net/ListHelp
>>>        <https://help.launchpad.net/ListHelp>
>>>    _______________________________________________
>>>    Mailing list: https://launchpad.net/~kicad-developers
>>>    <https://launchpad.net/~kicad-developers>
>>>    Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>    <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>    Unsubscribe : https://launchpad.net/~kicad-developers
>>>    <https://launchpad.net/~kicad-developers>
>>>    More help   : https://help.launchpad.net/ListHelp
>>>    <https://help.launchpad.net/ListHelp>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 



Follow ups

References