Wireshark mailing list archives
Re: git question
From: Dario Lombardo <dario.lombardo.ml () gmail com>
Date: Mon, 4 Dec 2017 10:36:59 +0100
If you have pushed to gerrit from your master (that is correct, but not the best option), you didn't do anything wrong. Gerrit uses a cherry-pick strategy when we promote a commit, that means that developer's commit histories don't play any role. What git is telling you is that you and master have diverged, and you have to update. Running git push --rebase does 1) fetch data from remote 2) stash your local commits 3) apply new commits from remote to your local copy 4) replay your stashed history: if a commit you have has already been merged, it won't be done again Then, I suppose you will be perfectly fine after it. If, after pull, git doesn't say you're up-to-date, it means that not merged commits still live in your master. As others have suggested: use branches in the future. It works better with gerrit's cherry-pick model. If your master reflects origin/master you more easily track the actual master repo. Hope it helps. Dario. On Sat, Dec 2, 2017 at 11:23 PM, e-mail graham.shanks via Wireshark-dev < wireshark-dev () wireshark org> wrote:
After submitting some changes to git review and getting them accepted I get the following message when I do a git status: C:\Development\wireshark>git status On branch master Your branch is ahead of 'origin/master' by 3 commits. (use "git push" to publish your local commits) nothing to commit, working tree clean A search on this message suggests that I need to do a git pull --rebase, but the documentation suggests that this will synchronise with the remote repository (which is what I want to do) but then try to apply the commits (which I don't want to do, I think). The git documentation on rebase doesn't seem to cover what I think the wireshark repository is doing. Is git pull --rebase the correct thing to do? Also did I do something wrong to get into this state? Regards Graham ____________________________________________________________ _______________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject= unsubscribe
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- git question e-mail graham.shanks via Wireshark-dev (Dec 02)
- Re: git question Ahmad Fatoum (Dec 02)
- Re: git question Guy Harris (Dec 02)
- Re: git question Guy Harris (Dec 02)
- Re: git question Guy Harris (Dec 02)
- Re: git question Guy Harris (Dec 02)
- Re: git question Dario Lombardo (Dec 04)