Wireshark-dev: Re: [Wireshark-dev] git question

From: Ahmad Fatoum <ahmad@xxxxxx>
Date: Sat, 2 Dec 2017 23:33:24 +0100
In future, better use branches, so you can trim them when they're no longer needed.
You can do this now with:
git branch my-change
git reset --hard HEAD~3

After that you can git pull master and decide whether you want to git branch --delete my-change

Alternatively, you can also git pull --rebase && git reset --hard HEAD~3 or git reset --hard HEAD~3 && git pull
which removes those three commit without saving them to a branch first.

Regards
Ahmad

> On 2Dec 2017, at 23:23, e-mail graham.shanks via Wireshark-dev <wireshark-dev@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx>
> Archives:    https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
>             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe

Attachment: signature.asc
Description: Message signed with OpenPGP