I am still confused by the git remote repository: If I make change to my branch, but also want to rebase my branch to current HEAD, I get a warning about "loosing history" when I try to push the new version onto the remote repository. It is allowed to force the push in that case or how should I proceed to avoid the "losing history" complaint. Pierre Muller GDB pascal language maintainer developer on archer-muller-windows-multi branch
> If I make change to my branch, but also want to rebase my branch to > current HEAD, I get a warning about "loosing history" when I try to > push the new version onto the remote repository. That's the disadvantage of using rebase. Rebase is great because it keeps the history linear. But the downside is that it makes it more difficult for others to track and make changes on top of your branch. > It is allowed to force the push in that case or how should I proceed > to avoid the "losing history" complaint. I don't know what the policy is on the Archer branch, or whether there is one or not. Given that you are doing the work using git mostly to be able to maintain a set of patches, I think that you would really benefit from using rebasing, rather than merging. As there is no one else pushing changes on that branch, it shouldn't have any impact on anyone else. Anyone more actively maintaining the Archer repo should be able to give you the final OK (or not). -- Joel
Joel> I don't know what the policy is on the Archer branch, or whether Joel> there is one or not. We don't really have one. I don't rebase the branches I push; I do that stuff locally. I know others have rebased public branches, though. I think the important consideration is whether anybody else is likely to be working with you on the branch. Tom
> -----Message d'origine-----
> De : archer@sourceware.org [mailto:archer@sourceware.org] De la part de
> Tom Tromey
> Envoyé : jeudi 10 mars 2011 22:51
> À : Joel Brobecker
> Cc : Pierre Muller; archer@sourceware.org
> Objet : Re: [Archer] Remote repository and git push command
>
> Joel> I don't know what the policy is on the Archer branch, or whether
> Joel> there is one or not.
>
> We don't really have one.
>
> I don't rebase the branches I push; I do that stuff locally.
> I know others have rebased public branches, though.
>
> I think the important consideration is whether anybody else is likely to
> be working with you on the branch.
As I don't expect this for now,
I tried to push my locally rebased files:
$ git push --force
Counting objects: 59, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (35/35), done.
Writing objects: 100% (35/35), 15.75 KiB, done.
Total 35 (delta 30), reused 0 (delta 0)
remote: error: denying non-fast-forward
refs/heads/archer-muller-windows-multi (
you should pull first)
To ssh://sourceware.org/git/archer.git
! [remote rejected] archer-muller-windows-multi ->
archer-muller-windows-multi
(non-fast-forward)
error: failed to push some refs to 'ssh://sourceware.org/git/archer.git'
What does that mean?
Pierre
On Fri, 11 Mar 2011 11:32:15 +0100, Pierre Muller wrote:
> As I don't expect this for now,
> I tried to push my locally rebased files:
>
> $ git push --force
> error: failed to push some refs to 'ssh://sourceware.org/git/archer.git'
FYI I just `git merge origin/master'. When one wants to get a single diff
`git diff origin/master'. For log of all the changes not cluttered by
upstream changes `git log --no-merges --first-parent'. For preparing a submit
upstream in a split form I use some inappropriate different scripts, though.
This makes the changes linear with no problems for pull/push and no need for
--force.
Regards,
Jan