Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: upgrade from 2.2.10 to 3 #2706

Open
irishetcher opened this issue Apr 9, 2024 · 12 comments
Open

Q: upgrade from 2.2.10 to 3 #2706

irishetcher opened this issue Apr 9, 2024 · 12 comments

Comments

@irishetcher
Copy link

Hi,

I just noticed, after not using VVV for a while that that my version is at 2.2.10. I have attempted to update to a variant of version 3 but I keep arrivibg back at 2.2.10. I have tried the follwoing procedure:

turn off the VM

vagrant halt

destroy the Ubuntu 14 VM

vagrant destroy

pull down the latest update

git pull

provision a shiny new Ubuntu 18 VM

vagrant up --provision

Anyone have any insights into why VVV may not be updating? I'm on the latest version of mac0S.

@tomjn
Copy link
Member

tomjn commented Apr 9, 2024

which branch are you on and what does VVV's splash screen show? git status output should help here, also git remote -v might reveal something off

@Mte90 Mte90 changed the title Q: Q: upgrade from 2.2.10 to 3 Apr 9, 2024
@irishetcher
Copy link
Author

irishetcher commented Apr 9, 2024

Hi Tom,

Thanks for the quick response.

The splash screen says the following:

v3.12 Ruby:2.6.6, Path:"/Users/stvaughan/vagrant-local"
_/_/_/ git::stable(aee9a69)

Platform: darwin19.2.0 shell:/bin/zsh vagrant-hostsupdater vagrant-goodhosts shared_db_folder_disabled
Vagrant: v2.2.10, virtualbox: v6.1.50

From the two commands you suggested I got the following:

git status
On branch stable
Your branch is up to date with 'origin/stable'.

Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: Vagrantfile

Untracked files:
(use "git add ..." to include in what will be committed)
ACF
Pic to Upload/
TTricks
VAGRANT UPDATE

no changes added to commit (use "git add" and/or "git commit -a")

On the above ACF and TTricks are two of the test WordPress sites I have installed. They are also two aliases I have at the top of the install so mayne this is what is referred to here.

Pic to Upload is just a folder of pictures for uploading to the TTrick site. Its at the top level of the install as well.

VAGRANT UPDATE is the one I don't seem to be able to identify.

AND

git remote -v
origin https://github.com/Varying-Vagrant-Vagrants/VVV.git (fetch)
origin https://github.com/Varying-Vagrant-Vagrants/VVV.git (push)

GitHub
An open source Vagrant configuration for developing with WordPress - Varying-Vagrant-Vagrants/VVV

@tomjn
Copy link
Member

tomjn commented Apr 9, 2024

Yup this explains it:

Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: Vagrantfile

git diff will tell you what modifications you made but as long as there are changes you can't pull down the newer commits with newer versions of VVV

@irishetcher
Copy link
Author

Thanks Tom,
I'll have a go at that.

@tomjn
Copy link
Member

tomjn commented Apr 11, 2024

@irishetcher did you get it updated in the end?

@irishetcher
Copy link
Author

irishetcher commented Apr 11, 2024

Hi Tom,

It still keeps installing to the same version. But, I do notice that I am actually on v3.12 not the Vagrant version v2.2.10 as I first reported by mistakes. So maybe that's where I should be anyway?

I managed to deal with the VAGRANT UPDATE file. That file has theses instructions to update?

VAGRANT UPDATE

# If you need a fresh start it's probably sensible to make sure you are on the stable branch
git checkout master
# Make sure this is the latest VVV
git pull
# Turn the machine on (so destroy can run its cleanup)
vagrant up
# Destroy the machine
vagrant destroy
# Make sure we use the latest version of the base box
vagrant box update
# Make sure the recommended vagrant plugins are installed
vagrant plugin install vagrant-hostsupdater
# And that they're all up to date
vagrant plugin update
# Start VVV and create the VM from scratch
vagrant up --provision

By any chance are these the instructions to update? There are so many versions of update around, it's always hard to guage which one to use.

git status is also saying that the directory I have placed in the top level (Pic to Upload) is untracked I followed the instructions to git add but then it wants me to push it. Not sure, if this is something that is pushed somewhere, where that somewhere is. If I try to move that directory out and run git status agian I get a list of warnings so I just followed the instructions to restore. git restore --staged Pic\ to\ Upload

Appologies if my explanation is vague. The command line is not something I use everyday.

What I have works for some local work. I have started using Local by Flywheel as well so for what I need this might suffice.

@tomjn
Copy link
Member

tomjn commented Apr 11, 2024

By any chance are these the instructions to update? There are so many versions of update around, it's always hard to guage which one to use.

I don't know where you got those instructions from, they look out of date, but all update instructions assume you have a clean git checkout, if git considers your checkout unclean with changes that haven't been committed then nothing past git pull can be done until that is resolved. Until git status says you have no untracked changes, and git pull works fine, the other steps are meaningless

To be clear, the issues you've had so far aren't specific to VVV, they're generic git problems

@tomjn
Copy link
Member

tomjn commented Apr 11, 2024

These are the current instructions: https://varyingvagrantvagrants.org/docs/en-US/installation/keeping-up-to-date/

VVV
Update VVV from time to time to keep pace with new fixes and improvements.

@irishetcher
Copy link
Author

I think trying git pull may be my issue here. I think it must have been installed from the download originally. Is there any way I can hook up to the git repository for this.

I just tried a manual install, but tricky trying to figure out what not to overrite. I made a mess but managed to rcover with a backup of the original directory.

@tomjn
Copy link
Member

tomjn commented Apr 11, 2024

You splash screen and git status output indicate that you're on the stable branch, an ls -al should reveal a .git folder.

git diff should show you what the untracked/uncommitted change is that git is trying to avoid destroying, I don't know what the change is but if you've ever modified that file to add a shared folder, enable public networking etc then that'll prevent updates from being pulled via git

@tomjn
Copy link
Member

tomjn commented Apr 11, 2024

This might be helpful: https://stackoverflow.com/questions/52704/how-do-i-discard-unstaged-changes-in-git#52713

Stack Overflow
How do I discard changes in my working copy that are not in the index?

@tomjn
Copy link
Member

tomjn commented Apr 11, 2024

A git stash might also help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants