Мерзавец: проверка файла от предыдущей фиксации и исправления его для ЗАГОЛОВКА

Вы можете использовать этот код для просмотра предупреждений:

 UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Title" message:@"Message" preferredStyle:UIAlertControllerStyleAlert];

        UIAlertAction* ok = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil];
        [alertController addAction:ok];

        [self presentViewController:alertController animated:YES completion:nil];

Для нескольких кнопок вы можете использовать:

 UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Title" message:@"Message" preferredStyle:UIAlertControllerStyleAlert];

        [alertController addAction:[UIAlertAction actionWithTitle:@"Button 1" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
            [self loadGooglrDrive];
        }]];

        [alertController addAction:[UIAlertAction actionWithTitle:@"Button 2" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
            [self loadDropBox];
        }]];

        [alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
            [self closeAlertview];
        }]];

        dispatch_async(dispatch_get_main_queue(), ^ {
            [self presentViewController:alertController animated:YES completion:nil];
        });

-(void)closeAlertview
{

    [self dismissViewControllerAnimated:YES completion:nil];
}
63
задан Coocoo4Cocoa 23 May 2009 в 00:47
поделиться

1 ответ

You've practically said it yourself:

First get the file back from one commit before:

$> git checkout HEAD~1 path/to/file.ext

Then commit it:

$> git commit -a -m 'Retrieved file from older revision'

If only the changes to that file where present in the last commit, you can even use git-revert:

$> git revert HEAD

I think it would be better to make this a separate commit, because it tells you exactly what you've reverted, and why. However, you can squash this into the previous commit by using the --amend switch to git-commit.

97
ответ дан 24 November 2019 в 16:24
поделиться
Другие вопросы по тегам:

Похожие вопросы: