Wireshark-dev: Re: [Wireshark-dev] GIT vs SVN
From: Peter Wu <lekensteyn@xxxxxxxxx>
Date: Fri, 25 Apr 2014 18:23:12 +0200
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.

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

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

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

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

Kind regards,
Peter