Closed SAnsell closed 6 years ago
Hi Jimmy,
Not as bad as I thought [maybe I am getting better at git]. Basically did a git revert --hard to my last commit and then did a git push --forced. There was a permissions issue but I could get round that by setting my local version to match and then setting my local version to the new form.
So I recommend you do the following.
(a) run: make tar from your directory and store the resulting .tgz file somewhere safe. If ABSOLUTELY everything goes wrong then you can recover all the work [but maybe not the git history] but you will have a working state.
(b) unless your git history is interesting or useful -- the next best thing is to either create a new directory and work from there
mkdir NewWork
cd NewWork
git init
git add remote https://github.com/SAnsell/CombLayer
git pull
git pull origin master
git checkout -b newWorkByJimmy
tar -zxvf /home/me/somedirectory/My_Previously_Made_File.tgz
git status
This will show your (A) changed files (B) NEW FILES
First deal with the NEW files:
You DONT want to add ALL new files just those that are *.cxx and
*.h and maybe some directories you created e.g. vespaComponent vespaComponentInc etc.
add them with
git add Model/ESSBeam/vespa/*.cxx
etc
you will need a lot.
then you get all the changed files with
git commit -a
Check the list of stuff to commit and make sure that you haven't
missed anything and then add a message [e.g. new stuff for vespa] and you have a proper branch that is valid.
When you have done that or the equivalent, i.e. you are not on the
master branch send me an email and I wlll put you back on the collaborators list and you can commit that as a branch and then [assuming you want it merged with the master] you initiate a pull request to which I will cherry-pick the bits I like and reject the rest.
hope that helps, any questions just ask
Stuart
On 16 July 2018 at 20:28, Jimmy notifications@github.com wrote:
I'm sorry, Stuart...
Il lun 16 lug 2018, 21:25 Stuart Ansell notifications@github.com ha scritto:
A particular user who works in Italy has just updated the Master branch with absolute junk.
This is absolutely unacceptable -- not every close. So I will revert to the previous version and work from there. Technically this will break the master branch but in fact that as it is not valid it wont affect anyone Sorry for the trouble.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SAnsell/CombLayer/issues/96, or mute the thread https://github.com/notifications/unsubscribe-auth/AXMKg6twS6_uXCCNmxRg- HpqMqECsFXAks5uHOiOgaJpZM4VRqdu .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SAnsell/CombLayer/issues/96#issuecomment-405354431, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZOQ2xVzv46zNNrHJzFfDbT55ywhrkhks5uHOlfgaJpZM4VRqdu .
Thank you.
I really really apologize for my mistake. I just wanted to merge the new commits from the Master to vespaModel branch. I miserably failed and the result was this.
I will follow the steps you wrote tomorrow, with much more precaution and treading carefully.
I'm terribly sorry.
Ok the repository is back to a sane state - No damage done! You have to admire git -- no matter what you do you seem to be able to recover...
I have added some extra guards on the permissions for the master branch and we should be ok if anyone makes the same mistake again, then they will be told that they need authorization from another person on the collaborators list [including if I do it!]
However, IF you have updated in the last 6 hours then another update is required.
A particular user who works in Italy has just updated the Master branch with absolute junk.
This is absolutely unacceptable -- not every close. So I will revert to the previous version and work from there. Technically this will break the master branch but in fact that as it is not valid it wont affect anyone Sorry for the trouble.