What I’m trying to do:
Originally wanted to clone my app as need to develop new version with a new external database structure but want to reuse a lot of code
What I’ve tried and what’s not working:
Tried to merge to master so can clone latest changes in dev branch. Merge not working with ‘Internal server error’ message. Downloaded GIT for Windows on local machine and cloned app from Anvil to local GIT. On local GIT renamed dev branch to master. Now want to create a clone on Anvil. Do not want to push to original. Set up new blank app and have tried many variations of PUSH command in local GIT to blank app but just keeps telling me ‘fatal: not a git repository (or any of the parent directories): .git’. This is using the link from ‘Clone with GIT’ where it says - 'The GIT repository for this app can be accessed at: ssh://steve.page%40val-cloud.com@anvil.works:2222/D6ANKE7WTCQCH5IA.git
Code Sample:
# this is a formatted code snippet.
# paste your code between ```
Clone link:
Can’t clone the app because merge to master fails with internal server error
share a copy of your app
My first thought is that you’re running the command in the wrong directory.
I’m not sure this has anything to do with the fact that you renamed the dev branch, but maybe try going through this process without that step.
Here is a forum post that goes through handling multiple remote repos: (Unofficial) Anvil Version Control for Dummies
Here is a guide for anvil extras that takes you through a process of taking an anvil app from a local git repo and pushing it to a blank anvil app (in this case the anvil extras app): Installation — Anvil Extras documentation
2 Likes
Firstly thank you yahiakalabs for your guidance which I have followed (and learnt a lot about GIT that I did not know before!).
I created a GIT repository on my local machine and cloned my main application from Anvil to local repo (this is the application that I wanted to clone in Anvil but was unable to do so because I got an internal server error when merging to master). In the local repo I managed to get everything in one master branch (not sure how I managed that - or did GIT do it automatically?)
Following the Anvil-Extras example I then created a very minimalistic app in Anvil and cloned that to a GIT repo on my local machine. I then pulled the main app from it’s local repo into the minimal GIT repo and resolved the merge conflicts that arose. I then pushed the repo back to Anvil minimalistic app. I can see the version history in a branch called master but when I click on the latest commit in version history I get a message saying “Cannot destructure property ‘forms’ of ‘t’ as it is undefined.” and the dreaded spinning wheel and the app never loads.
Any thoughts?
Thanks and regards
Steve
Further update.
When I look at version history in Anvil I can see the commit that I want to become the current version of the app on the master branch - this is the commit I have tagged as ‘Safe’ in the screenshot attached.
I notice that commit ‘Safe’ is now on a branch with no name (as opposed to a horse!). I would like to get rid of the commits above ‘Safe’ and have ‘Safe’ and commits below on branch master.
Is that possible?
Regards
Steve
You can right click on the safe commit and choose to reset the master branch to it. From there make changes and commits normally, and ignore the other commits.
Hi jshaffstall,
Thanks for your reply.
When I right click on the Safe commit I do not see an option to reset the master branch to it. The options I see are: -
- Publish this commit
- Create branch here…
- Tag this commit
- Delete tag ‘Safe’
Regards
Steve
This is what I see in the IDE when right clicking on a commit line:
I suspect you’re clicking on the tag Safe, instead of the remainder of the line to the right of the tag itself?
Hi jshaffstall,
Thanks for the guidance.
I found out the problem was that the Editing Branch box was blank. When I set it to ‘master’ I then saw different options on right click that allowed me to merge. That worked ok and then I had a dependency to resolve and all looks fine now.
A big callout thankyou to @yahiakalabs and @jshaffstall for your invaluable help and guidance.
I will now close this thread.
Regards
Steve
3 Likes