Closed aalyokhin closed 6 years ago
Hey @aalyokhin ,
what is the output when doing git branch
on the server that you are trying this with?
From the log output it looks like the branch content-sync
doesn't exist locally, as in has never been checked out?
Best Christian
@karfau thanks a lot for your answer and for pointing me to right direction.
Indeed, git branch
gave me On branch master
. I've checked out needed branch manually and it worked. I'm updating the site manually by uploading new version to a server and then unpacking it there. Does it mean, that every time I'm uploading new site version, I will have to use SSH to checkout content-sync
branch in the console? I'm wondering why the plugin does not do it by itself, as it makes sense to checkout the branch which is set in the options, by pressing Save button after configuring it...
Glad this solved your problem. Not sure what you mean by unpack. I would expect that you are always keeping the branch checked out. If you are uploading content manually to the directory under version control you would need to also commit those changes using ssh, right?
What about just commiting and pushing your changes to the content-sync
branch when developing, and then just doing a git pull
via ssh? (actually the git-sync plugin also does that when it "synchronizes" (I believe there is a button in the configuration page of the plugin?), if this is good enough when editing both in the admin panel and on your developer machine, is something for you to find out.
You should also be able to configure the webhook as described in the wizard, to automaticall sync your changes whenever you push something to the repo.
I agree the plugin could/should make sure the configured branch is checked out, so it commits to the right one. I guess currently it just assumes that the branch you configure is already checked out... yes, this plugin still has some rough edges :)
Good catch here guys. I think nowhere in the execution of the sync a 'checkout' is happening. It should do a git checkout <branch_in_config>
every time it begins, to ensure it is on the right one.
@aalyokhin when you manually switched to content-sync
, it didn't ever revert back to master correct?
Hi guys.
I'm fighting with this for the whole day already. Got tired of manual content sync and decided to give git-sync a shot. But it's just not working for me. Details:
I need to set-up separate branch (like
content-sync
), so the plugin could sync the content with it and then I'll merge the changes where I need to. But it looks like it works only when remote branch is set tomaster
. I have already tried a lot of times to set up it from scratch but the result is the same - when I click save after filling all options:error: src refspec content-sync does not match any. error: failed to push some refs to 'https://aalyokhin:{password}@bitbucket.org/aalyokhin/reponame.git'
When I set it to master it works like a charm. Tried it with Bitbucket and VS Team services repos - all the same, master works, branch doesn't. What I'm missing? Syncing with master is redicilous...
Logs:
Thanks in advance!