Wireshark mailing list archives

Re: GIT vs SVN


From: Alexis La Goutte <alexis.lagoutte () gmail com>
Date: Mon, 28 Apr 2014 12:32:53 +0200

On Fri, Apr 25, 2014 at 7:48 PM, Jeff Morriss <jeff.morriss.ws () gmail com> wrote:
On 04/25/14 12:23, Peter Wu wrote:

On Friday 25 April 2014 11:27:35 Jeff Morriss wrote:

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.


If you do not set a remote for this branch, then this branch won't be
pushed.
The default behavior of "git push" without options can be configured with
the
"push.default" setting (see man git-config(1)).

There is nothing that prevents you from running `git push origin foo`
though.


I don't like to type so many characters so I never type "git push origin
<anything>" anyway.  Then again, I never type "git push" now, I just do "git
review -f".


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

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


If you don't need to update master, you can follow this:


Well, that's an interesting question.  I guess the branch is pretty useless
for me since I normally stay in my private branch.  Its only purpose is to
serve as a starting point for things which will eventually be pushed ("git
checkout -b bugXXXX master").


4) git fetch

(assuming that your current branch is myprivatebranch)
5a) git rebase origin/master
(otherwise, to combine git checkout && git rebase origin/master:)
5b) git rebase origin/master myprivatebranch


Cool, thanks!


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".

I have a upbranchall.sh script...
with
 git fetch -all
 for branch in `git branch | sed -e "s/^ *//g" | sed -e "s/* //g"`; do
     git checkout "$branch"      || exit 1
     git rebase "origin" || exit 1
 done

And update/upgrade all my branch :-)



git fetch && git rebase origin/master && time make -j9


Of course after the first time that becomes "escape-/rebase" followed by
"enter."  Otherwise it's way too much typing. :-)


___________________________________________________________________________
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
___________________________________________________________________________
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: