Flutter

[Flutter]플러터 업그레이드(강제 업그레이드)

코린이탈출기 2024. 3. 9. 22:40
728x90

 

1. 현재 버전

 

flutter --version

 

 

 

2. 플러터 업그레이드

 

flutter upgrade

 

 

그런데 다음과 같은 메세지가 출력되었다.

 

Your flutter checkout has local changes that would be erased by upgrading.
If you want to keep these changes, it is recommended that you stash them via "git stash" or else commit the changes to a local branch.
If it is okay to remove local changes, then re-run this command with "--force".

 

 

아마.. IDE 등에서 뭔가 잘못 건드려진 부분이 있는 것 같다.

 

● 변경 사항 확인

stackoverflow

 

=> 만약 Git에서 변경된 부분이 있고 어떤 부분이 변경되었는지 확인하고 싶다면, git diff HEAD 또는 git diff 명령을 사용하여 변경사항을 확인하면 된다.

 

● 변경 사항 임시 저장

If you want to keep these changes, it is recommended that you stash them via "git stash" or else commit the changes to a local branch.

=> 이전에 수행한 변경 사항을 유지하려면 "git stash" 명령을 사용하여 작업을 임시 저장해야 하며 업그레이드 후에 저장된 작업을 다시 적용할 수 있다.

 

 

[참고]

https://stackoverflow.com/questions/73380891/your-flutter-checkout-has-local-changes-that-would-be-erased-by-upgrading-whe

 

"Your flutter checkout has local changes that would be erased by upgrading." when running flutter upgrade

I recently decided to run flutter upgrade, but after starting, the command terminal states: Your flutter checkout has local changes that would be erased by upgrading. If you want to keep these cha...

stackoverflow.com

 

 

신경 쓰이는 부분이 없다면 강제 업그레이드를 진행해도 된다.

 

 

2.1. 플러터 강제 업그레이드

 

flutter upgrade --force

 

 

이 명령어는 현재 Flutter SDK의 최신 버전을 가져온다.

패키지가 쭉 다운 받아진다.

 

 

Flutter 3.7.12 에서 3.19.2 버전으로 업그레이드 되었다.

Dart도 2.19.6 에서 3.3.0 버전으로 업그레이드 되었다.

 

마지막으로 flutter doctor가 자동으로 실행되고 이슈 없이 완료된 것을 확인할 수 있었다.

 

 

 

[참고]

https://docs.flutter.dev/release/upgrade

 

Upgrading Flutter

How to upgrade Flutter.

docs.flutter.dev

 

 

 

728x90