[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stash

From: Steinar Bang
Subject: Re: Stash
Date: Sun, 05 Apr 2015 20:31:07 +0200
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (windows-nt)

>>>>> Richard Stallman <address@hidden>:

> When people told me that my changes in Lisp files did not get pushed,
> I did git pull again, and it told me there was a problem
> lisp/ChangeLog again, but there was no conflict in it.
> Then I did git commit again.

Hm... that may not have been enough? Did you stage lisp/ChangeLog before
before doing the commit? Ie.
 git add lisp/ChangeLog
 git commit

If you didn't and this was marked as a merge, the commit probably didn't

> Then I did git push again, and got this.

>     To address@hidden:/srv/git/emacs.git
>      ! [rejected]        master -> master (non-fast-forward)
>     error: failed to push some refs to 'address@hidden:/srv/git/emacs.git'
>     To prevent you from losing history, non-fast-forward updates were rejected
>     Merge the remote changes (e.g. 'git pull') before pushing again.  See the
>     'Note about fast-forwards' section of 'git push --help' for details.

> I have no idea what that means.

It means someone else pushed since your last pull.  Try doing a new
pull, followed by a push.
 git pull
 git push

>> My guess would be that these are still stashed, and need to be
>> unstashed and then pushed.

> How can I tell?

> And if those changes are stashed, why did they show up in git diff?

Don't have enough context to say anything here, sorry.

> Anyway, I did 'git stash pop' to see if they were stashed.

> That seems to have changed dozens of files.
> 'git diff origin/master' gave me 5000 lines.

> So I tried doing 'git stash' again, and it gave me an error,

>     fatal: git-write-tree: error building trees
>     Cannot save the current index state

Hm... that's a new one.

> I don't have all the output.  I had run git in a shell buffer a few
> times, and it causes a lot of trouble about the terminal.  So I started
> running it in an ordinary terminal.

> Fortunately it seems that all my changes did make it into Savannah.
> So it is just a matter of how to get a clean repository.

> Is there any way I can fix this other than creating a new repository?
> I should not do that here; it would cost my host too much money, I
> fear.

If you are sure that all of your changes are on savannah, then
 git reset --hard HEAD
should fix things.

Note that if you actually have local changes this is a command that will
lose those changes.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]