-
Notifications
You must be signed in to change notification settings - Fork 848
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: Problem switching to branch stable #2746
Comments
What changes did you make to the A |
In the meantime abort the merge with |
Originally I had to comment two lines in Vagrantfile related to 'vagrant-goodhosts' as it did not work properly (at least on Windows). The diff 'git diff Vagrantfile' seems between the shortened version of the last master branch and a newer version. After executing 'git merge --abort' the shortened version of the master branch is reinstalled on my drive. Executing 'git diff Vagrantfile' or 'git diff --cached Vagrantfile' now results in no output. |
you do not want the Otherwise your goal is to eliminate all changes so that A |
Also with applying 'git reset --hard' I end in the endless update loop again: $ git status $ git pull $ git pull origin stable
|
The Git editor did hide words in angle brackets. The answer at 'git pull' contained an expanded command 'git pull <remote> <branch>' where <remote> and <branch> where hidden. |
What happens with a |
Or rather this to reset to match remote branch exactly: switch to the
then reset stable to what github has:
|
$ git fetch origin && git checkout stable |
In future if you make any changes to a VVV file they need to be undone before you try to pull down any changes and restored afterwards |
Yeah you need to abort any merges etc and get back to the Whatever you do, do not |
If you have something like VSCode or a Git GUI it will show all the staged/unstaged changes as well as options to discard/unstage them |
Now the stable branch seems to be installed although I always got the merge conflict messages. Git GUI does not display any staged/unstaged changes any more. Also the file 'version' contains the proper version number 3.13.2 of the last stable. May be I've made a mistake when I created a local 'stable' branch and did pull into it ('git pull origin stable'). In one of my last tries I executed 'git pull origin master' where origin is related to the stable branch of the Github repository and master is the local branch. Although it resulted in a merge conflict too, I now have the updated files. The last strange thing is the call to http://vvv.test/. It still displays the old version number 3.8.1 even after restarting vagrant. Many thanks for your fast help. When working only every some years with that stuff, it is easy to get lost. |
Yeah this doesn't seem great as it probably branched off of What I'd do is this: Abort any merges: git merge --abort checkout git checkout master Delete the local git branch -d stable Fetch remote changes and checkout the git fetch origin
git checkout stable
git pull Then reprovision vagrant up --provision Then you should be on the latest version. Note that in the beginning you could have done this: git stash # stash your vagrant file changes
git checkout stable # switch to the stable branch
git pull # grab the latest version of stable
git stash pop # restore your vagrant file changes
vagrant up --provision And if you had not modified the vagrant file it would be this: git checkout stable
git pull
vagrant up --provision Though you should not have needed to remove goodhosts. Whatever you do:
All of these things hurt rather than help by taking you further away from what GitHub has, and introducing new differences that have to be undone. The goal isn't to shut up git, it's to make your copy of things identical to GitHub. |
Just to clarify what your current problem is, by making new commits and a new branch you've created an alternate timeline that's branched off in its own direction by making new commits and new branches. That's why git is complaining about merge conflicts and resolution. That's also why my comment above deletes your branch and tries to reset it back to what is considered canonical. |
Thank you for your directions. After executing the commands it looked quite well. But I decided to stop before the last
During a
So there seems to be a version mismatch for 'vagrant-goodhosts'. Do you have any idea how to solve that? |
Add |
After having problems updating to the new 'stable' branch from v3.8.1 I applied the command
git merge --abort
After this command the state seemed quite well but in the end I did end where I started before.
It seems to become a endless update loop.
$ git status
On branch stable
nothing to commit, working tree clean
$ git remote -v
origin https://github.com/Varying-Vagrant-Vagrants/VVV (fetch)
origin https://github.com/Varying-Vagrant-Vagrants/VVV (push)
$ git checkout stable
Already on 'stable'
$ git pull origin stable
From https://github.com/Varying-Vagrant-Vagrants/VVV
Removing provision/core/nginx/apt-keys/nginx_signing.key
Auto-merging Vagrantfile
CONFLICT (content): Merge conflict in Vagrantfile
Removing .github/ISSUE_TEMPLATE/monteray-virtualbox-timeouts.yml
Automatic merge failed; fix conflicts and then commit the result.
$ git status
On branch stable
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Changes to be committed:
modified: .gitattributes
modified: .github/ISSUE_TEMPLATE/bug-report.yml
deleted: .github/ISSUE_TEMPLATE/monteray-virtualbox-timeouts.yml
modified: .github/workflows/vvv-provisioning.yml
modified: CHANGELOG.md
modified: README.md
modified: config/default-config.yml
modified: config/homebin/db_backup
modified: config/homebin/db_restore
modified: config/homebin/switch_php_debugmod
modified: config/homebin/vagrant_provision
modified: config/homebin/vagrant_up
modified: config/homebin/vvv_restore_php_default
modified: config/init/vvv-start.conf
modified: config/php-config/php-fpm.conf
modified: config/php-config/php-www.conf
modified: config/php-config/upstream.conf
modified: database/sql/import-sql.sh
modified: database/sql/init.sql
modified: provision/core/composer/provision.sh
modified: provision/core/deprecated.sh
modified: provision/core/env/homedir/.bash_aliases
modified: provision/core/env/homedir/.bash_profile
modified: provision/core/env/provision.sh
modified: provision/core/env/ssh/ssh_known_hosts
modified: provision/core/git/provision.sh
new file: provision/core/git/sources-ubuntu-jammy.list
modified: provision/core/mailhog/provision.sh
new file: provision/core/mariadb/config/debian.cnf
modified: provision/core/mariadb/provision.sh
new file: provision/core/mariadb/sources-ubuntu-jammy.list
modified: provision/core/memcached/config/memcached.conf
new file: provision/core/nginx/apt-keys/nginx-archive-keyring.gpg
deleted: provision/core/nginx/apt-keys/nginx_signing.key
modified: provision/core/nginx/config/nginx.conf
new file: provision/core/nginx/config/site-fallback.conf
modified: provision/core/nginx/config/sites/default.conf
new file: provision/core/nginx/default-pages/nodashboard.html
modified: provision/core/nginx/provision.sh
new file: provision/core/nginx/sources-ubuntu-jammy.list
modified: provision/core/node-nvm/provision.sh
new file: provision/core/node-ppa/sources-ubuntu-jammy.list
modified: provision/core/php/provision.sh
modified: provision/core/php/sources-ubuntu-bionic.list
modified: provision/core/php/sources-ubuntu-focal.list
new file: provision/core/php/sources-ubuntu-jammy.list
new file: provision/core/phpcs/.gitignore
modified: provision/core/phpcs/composer.json
modified: provision/core/phpcs/provision.sh
new file: provision/core/phpcs/readme.md
modified: provision/core/vvv/provision.sh
modified: provision/core/vvv/sources-ubuntu-bionic.list
modified: provision/core/vvv/sources-ubuntu-focal.list
new file: provision/core/vvv/sources-ubuntu-jammy.list
modified: provision/core/wp-cli/provision.sh
modified: provision/provision-dashboard.sh
modified: provision/provision-helpers.sh
modified: provision/provision-site.sh
modified: provision/provision.sh
modified: provision/provisioners.sh
modified: version
modified: www/default/phpinfo/index.php
modified: www/default/xdebuginfo/index.php
Unmerged paths:
(use "git add ..." to mark resolution)
both modified: Vagrantfile
$ git add Vagrantfile
This last command did not help to stop the loop. I end always with the message 'You have unmerged paths.'
The text was updated successfully, but these errors were encountered: