Wireshark mailing list archives

Re: GIT vs SVN


From: Jeff Morriss <jeff.morriss.ws () gmail com>
Date: Fri, 25 Apr 2014 11:27:35 -0400

On 04/25/14 01:18, Jaap Keuter wrote:
On 04/04/2014 10:11 PM, Evan Huus wrote:
On Fri, Apr 4, 2014 at 4:08 PM, Guy Harris <guy () alum mit edu> wrote:

On Apr 4, 2014, at 9:21 AM, Herb Falk <herb () sisconet com> <Herb () sisconet com> wrote:

No, I just wanted to understand.  It will be a couple of hours work.  Tried to GIT clone and to add in my changes, but it 
didn't go well.


If you only want to keep your own private repository, with a modified version of Wireshark that tracks the trunk (and with 
you being responsible for dealing with merge conflicts), I'm not sure what the right way to do that is in Git.

Keep a clone, and do your own work in a branch off master. When you
want to update the underlying base, fetch from the master repository
and rebase your branch on top of the latest master.


This.

Would this be regarded a basic git knowledge, or a way specifically suited for
our repository setup? Then it would be a valuable addition to the Wiki.

Basically:

1) Create a branch off master (git checkout -b myprivatebranch master)
2) Make your changes
3) Check in your changes (git commit -a)
3.a) Make sure you never "git push" from this branch :-). If someone knows a way to make it impossible, please let me know.

Then if you want to pull in the later changes just do:

4) git checkout master
5) git pull
6) git rebase master myprivatebranch

git's pretty cool in that steps 4-6 can be automated: I have a script named ~/bin/git-uup (haven't thought of a better name) which does 4-6 so I only have to type "git uup && make -j 9".

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: