February 21, 2014
On 2/21/2014 12:46 AM, Daniel Murphy wrote:
> I've fixed it, please stop pushing to upstream.
>

Hmm, the fix I made to testCols.d disappeared as well.

The problem with testCols.d is it was added with CRLFs in it. This rendered my local git repository unusable, as it would insist I had uncommitted changes, but would not let me do anything with testCols.d, so I could not do anything. I couldn't even issue a pull request to fix testCols.d.

I noticed that testCols.d is back to having CRLFs in it. This time, however, I won't try to fix it. Can you, please?
_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals


February 21, 2014
You had an old master, with your testCols commit on top.  Then you merged upstream master into it.  Then you pushed that merge commit to upstream, accidentally.

When you 'fixed' it, you made the testCols commit the new master.  This discarded all the changes from the upstream master. (from the last day or so)

Luckily this doesn't seem to happen very often.  To make this less likely, I recommend you do not pull from upstream master manually, and you instead have a sh/batch file that runs: `git pull upstream master --ff-only` which will fail loudly if you have made changed in your master branch (rather than silently creating a merge commit).

As for CRLFs, I recommend turning git's autocrlf off, so git no longer messes with your line endings.

https://github.com/D-Programming-Language/dmd/pull/3307


On Fri, Feb 21, 2014 at 8:20 PM, Walter Bright <walter@digitalmars.com>wrote:

>
> On 2/21/2014 12:46 AM, Daniel Murphy wrote:
>
>> I've fixed it, please stop pushing to upstream.
>>
>>
> Hmm, the fix I made to testCols.d disappeared as well.
>
> The problem with testCols.d is it was added with CRLFs in it. This rendered my local git repository unusable, as it would insist I had uncommitted changes, but would not let me do anything with testCols.d, so I could not do anything. I couldn't even issue a pull request to fix testCols.d.
>
> I noticed that testCols.d is back to having CRLFs in it. This time, however, I won't try to fix it. Can you, please?
>
> _______________________________________________
> dmd-internals mailing list
> dmd-internals@puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
>


February 21, 2014
But I had just pulled the latest master and did a refresh on github to ensure there had been no new changes before I pushed. I'm still a bit baffled why that didn't work.

So, what's the correct procedure to undo the last commit to master?

On 2/21/2014 1:40 AM, Daniel Murphy wrote:
> You had an old master, with your testCols commit on top.  Then you merged upstream master into it.  Then you pushed that merge commit to upstream, accidentally.
>
> When you 'fixed' it, you made the testCols commit the new master.  This discarded all the changes from the upstream master. (from the last day or so)
>
> Luckily this doesn't seem to happen very often.  To make this less likely, I recommend you do not pull from upstream master manually, and you instead have a sh/batch file that runs: `git pull upstream master --ff-only` which will fail loudly if you have made changed in your master branch (rather than silently creating a merge commit).
>
> As for CRLFs, I recommend turning git's autocrlf off, so git no longer messes with your line endings.
>
> https://github.com/D-Programming-Language/dmd/pull/3307
>

_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals


February 21, 2014
On Fri, Feb 21, 2014 at 8:51 PM, Walter Bright <walter@digitalmars.com>wrote:

> But I had just pulled the latest master and did a refresh on github to ensure there had been no new changes before I pushed. I'm still a bit baffled why that didn't work.
>
>
When you did git reset --soft HEAD^ it picked the testCols commit, because you had merged master into that branch rather than the other way around.



> So, what's the correct procedure to undo the last commit to master?
>
>
The way I usually do it is to look at the history (git log, gitk, or the internals list) to get the hash of the last correct merge commit, then `git reset --hard` to that.

But this can seriously screw things up if done wrong, so if you're not 110% sure it's best to just let somebody else fix it.


>
> On 2/21/2014 1:40 AM, Daniel Murphy wrote:
>
>> You had an old master, with your testCols commit on top.  Then you merged upstream master into it.  Then you pushed that merge commit to upstream, accidentally.
>>
>> When you 'fixed' it, you made the testCols commit the new master.  This discarded all the changes from the upstream master. (from the last day or so)
>>
>> Luckily this doesn't seem to happen very often.  To make this less likely, I recommend you do not pull from upstream master manually, and you instead have a sh/batch file that runs: `git pull upstream master --ff-only` which will fail loudly if you have made changed in your master branch (rather than silently creating a merge commit).
>>
>> As for CRLFs, I recommend turning git's autocrlf off, so git no longer messes with your line endings.
>>
>> https://github.com/D-Programming-Language/dmd/pull/3307
>>
>>
> _______________________________________________
> dmd-internals mailing list
> dmd-internals@puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
>


February 21, 2014
Ok. Thanks for fixing it. But I STILL cannot get past testCols.d. git won't let me do ANYTHING because it regards testCols.d as "the same only different" because of those goddamed CRLF's in it.

On 2/21/2014 2:01 AM, Daniel Murphy wrote:
> On Fri, Feb 21, 2014 at 8:51 PM, Walter Bright <walter@digitalmars.com <mailto:walter@digitalmars.com>> wrote:
>
>     But I had just pulled the latest master and did a refresh on github to
>     ensure there had been no new changes before I pushed. I'm still a bit
>     baffled why that didn't work.
>
>
> When you did git reset --soft HEAD^ it picked the testCols commit, because you had merged master into that branch rather than the other way around.
>
>     So, what's the correct procedure to undo the last commit to master?
>
>
> The way I usually do it is to look at the history (git log, gitk, or the internals list) to get the hash of the last correct merge commit, then `git reset --hard` to that.
>
> But this can seriously screw things up if done wrong, so if you're not 110% sure it's best to just let somebody else fix it.
>



February 21, 2014
On 21 feb 2014, at 21:21, Walter Bright <walter@digitalmars.com> wrote:

> Ok. Thanks for fixing it. But I STILL cannot get past testCols.d. git won't let me do ANYTHING because it regards testCols.d as "the same only different" because of those goddamed CRLF's in it.


Running "git reset --hard" will restore your local copy to the latest commit. It will undo all modified files but not touch any untracked files.

-- 
/Jacob Carlborg


_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals


February 22, 2014
Daniel Murphy, el 21 de February a las 20:40 me escribiste:
> You had an old master, with your testCols commit on top.  Then you merged upstream master into it.  Then you pushed that merge commit to upstream, accidentally.
> 
> When you 'fixed' it, you made the testCols commit the new master.  This discarded all the changes from the upstream master. (from the last day or so)
> 
> Luckily this doesn't seem to happen very often.  To make this less likely, I recommend you do not pull from upstream master manually, and you instead have a sh/batch file that runs: `git pull upstream master --ff-only` which

You could also use an alias:
git config alias.update 'pull upstream master --ff-only'
Then `git update` will do that for you.


-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
Yo soy peperino el que siempre pone el vino, yo soy aquel que come los
huevos con tocino.
	-- Peperino PĆ³moro
_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals
February 21, 2014
On 2/21/2014 1:19 PM, Jacob Carlborg wrote:
> On 21 feb 2014, at 21:21, Walter Bright <walter@digitalmars.com> wrote:
>
>> Ok. Thanks for fixing it. But I STILL cannot get past testCols.d. git won't let me do ANYTHING because it regards testCols.d as "the same only different" because of those goddamed CRLF's in it.
>
> Running "git reset --hard" will restore your local copy to the latest commit. It will undo all modified files but not touch any untracked files.
>

Thank you. I'll try that next time.
_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals


1 2
Next ›   Last »