Maintaining my own branch with git
    Andrea Venturoli 
    ml at netfence.it
       
    Wed Apr 28 11:49:33 UTC 2021
    
    
  
Hello.
I know tons of messages have been written on the subject: I read them 
all, along with the Git Primer docs, but somehow I think I'm not doing 
it right and I cannot understand what I'm doing wrong.
I need to have some patches applied to both src and ports and distribute 
them to several machines.
So I have my own git server and I want to keep my own FreeBSD branches.
I cloned FreeBSD's git repository and pushed into my server; then I 
created my own branches.
The situation is now:
> % git remote
> freebsd
> netfence
> % git status
> On branch main
> Your branch is up to date with 'netfence/main'.
> 
> nothing to commit, working tree clean
So I'm on my own branch with my own differences wrt original freebsd's.
Now I issue:
1) git pull freebsd
2) git rebase freebsd/main
3) git push netfence --force
1) This does not merge, as I'm not on a "freebsd" branch. Ok, I think.
2) Here I have the first problem: rebasing is getting slower and slower. 
It almost looks like it's every time replaying history from the first 
day I started this to the current status. AFAICT, if I rebase now, 
everything from the past should be accounted for and forgotten. If I 
rebase tomorrow, I would expect only the new upstream commits to be 
taken into acount, but instead there are thousands of them.
3) Pushing without "--force" is not allowed as "the tip of your current 
branch is behind its remote counterpart. Integrate the remote changes 
(e.g. hint: 'git pull ...') before pushing again."
What's wrong with the above approach?
  bye & Thanks
	av.
    
    
More information about the freebsd-questions
mailing list