Wireshark-dev: Re: [Wireshark-dev] Advice needed regarding git push to gerrit

From: Paul Offord <Paul.Offord@xxxxxxxxxxxx>
Date: Thu, 7 Jan 2016 07:49:04 +0000
Thanks Guy.

That did the trick.

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Guy Harris
Sent: 06 January 2016 23:19
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] Advice needed regarding git push to gerrit


On Jan 6, 2016, at 2:52 PM, Paul Offord <Paul.Offord@xxxxxxxxxxxx> wrote:

> I’m trying to upload a patch set to gerrit.  The git status before I do the upload is:
> 
> C:\Development\Wireshark>git status
> On branch bug11968
> Changes to be committed:
>   (use "git reset HEAD <file>..." to unstage)
>  
>         modified:   epan/plugin_if.c
>         modified:   epan/plugin_if.h
>         modified:   ui/qt/main_window.cpp
>         modified:   ui/qt/main_window.h
> 
> When I run the git push I get this:
> 
> C:\Development\Wireshark>git push 
> ssh://PaulOfford@xxxxxxxxxxxxxxxxxx:29418/wireshark HEAD:refs/for/master/bug11968 Enter passphrase for key '/c/Users/aslpjo/.ssh/id_rsa':
> Counting objects: 176, done.
> Delta compression using up to 4 threads.
> Compressing objects: 100% (71/71), done.
> Writing objects: 100% (176/176), 73.10 KiB | 0 bytes/s, done.
> Total 176 (delta 152), reused 128 (delta 105)
> remote: Resolving deltas: 100% (152/152)
> remote: Processing changes: refs: 1, done To 
> ssh://PaulOfford@xxxxxxxxxxxxxxxxxx:29418/wireshark
> ! [remote rejected] HEAD -> refs/for/master/bug11968 (no new changes)
> error: failed to push some refs to 'ssh://PaulOfford@xxxxxxxxxxxxxxxxxx:29418/wireshark'
> 
> What am I doing wrong?

Not doing a "git commit" before the "git push".  You've staged your changes, but you haven't committed them yet, as per "Changes to be committed".

With CVS and SVN, if you're going to be working with code for which there's a remote "official" repository, you check out a tree from the remote repository, and when you commit changes, they go into the remote repository.

with Git (and possibly with other "distributed" version control systems), you don't check out a tree from a remote repository, you "clone" the remote repository, so you have your own repository.  "Committing" means "checking into your own personal local repository", and sending changes to a *remote* repository is done with a separate operation - either a "push", where you send your changes to the remote repository, or a "pull", where the people maintaining the remote repository pull your changes from your repository (which, for them, is the remote repository) to their repository (which, for them, is the local repository).
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe

______________________________________________________________________

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

Any views or opinions expressed are solely those of the author and do not necessarily represent those of Advance Seven Ltd. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Advance Seven Ltd. Registered in England & Wales numbered 2373877 at Endeavour House, Coopers End Lane, Stansted, Essex CM24 1SJ

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________