Nope … I get
Tobis-Mac:kirby Tobi$ git pull
fatal: No remote repository specified. Please, specify either a URL or a
remote name from which new revisions should be fetched.
My repo is only loan and not synced with GitHub or another server.
Nope … I get
Tobis-Mac:kirby Tobi$ git pull
fatal: No remote repository specified. Please, specify either a URL or a
remote name from which new revisions should be fetched.
My repo is only loan and not synced with GitHub or another server.
How did you install the project? did you clone it or make a repo out of a download?
I downloaded the starter kit (as ZIP), created a new empty repo in Tower and copied the files/folders form the starter kit into the repo. I guess this is not the best wys but I don’t know another I really like the idea of using git but I’m an absolute beginner and don’t really know whats going on …
I did a brief test, because I’ve never done it this way before. So what I did:
This worked without any problems.
If all else fails and you don’t care about your commit history, you could just clone a new plain/starterkit and paste your project stuff. In general, if you start a new project, the easiest way is to clone a kit instead of downloading a zip.
Hi,
yes it works with a fresh plaint, but when I download the ZIP from GitHub the kirby/
and panel/
folders are empty. I guess thats why I can add a submodule without problems.
When I clone the plain kit I get a kit with working submodules but this is also linked to the GitHub plain kit as origin, which is not intended. Can I delete this origin without problems?
If all else fails and you don’t care about your commit history, you could just clone a new plain/starterkit and paste your project stuff. In general, if you start a new project, the easiest way is to clone a kit instead of downloading a zip.
Jep, thats what I planned to do, but I’d like to check first if there’s another way …
You don’t have to delete the origin, you can just set the url of origin to your own remote repo if needed, see http://getkirby.com/blog/working-with-git. If you don’t need a remote, you can just leave it as is.
Edit: Ok, another test which worked for me (this time with a starterkit downloaded from the download page, not from GitHub) :
cd starterkit
git add --all
git commit -m "commit everything"
Then I deleted the panel and kirby folders and staged/commited again
git add --all
git commit -m "delete Kirby and Panel folders"
And then added the submodules:
git submodule add git@github.com:getkirby/panel.git
git submodule add git@github.com:getkirby/kirby.git
cd kirby
git submodule init
git submodule update
Thanks! That worked … at least I know have the submodules and the folders are not empty. But now the pages doesn’t render anymore and I don’t can use the panel (blank white page in both cases). As far as I can tell the folder contents of kirby/
and panel/
are correct and in the right place.
Edit I just found that the toolkit folder is empty … but shouldn’t it be part of the kirby submodule …?
Edit 2 I had to manually update/initilize the toolkit folder, now it works fine.
Yes,but it is a separate submodule, therefore you need to initialize it as well as described in the last 3 lines above:
cd kirby
git submodule init
git submodule update
Yep, I found this out already … (see Edit 2 in my post above)
But what I’m unsure about know is how to update. What is the difference between selecting the master
branch and a version tag? And what is the preferred way (I read the linked blog article, which suggests master
).
Instead, you can also use the following one-liner in your starterkit directory:
git submodule update --init --recursive
If you update to the master branch, you get the latest state of the repo (which is usually the same as the last version tag).
The version tags are useful if you want to go back to an older Kirby version, i.e. if you have updated and find that something does not work as it should.
Okay. Then I’ll go with master. Thanks, again!
Now I have to understand how to use this with Tower instead of the command line …
If you want to test the dev branch, you can use these two lines:
git submodule foreach --recursive git checkout develop
git submodule foreach --recursive git pull origin develop
And to switch back to master
git submodule foreach --recursive git checkout master
git submodule foreach --recursive git pull origin master
Can’t really help with Tower, I prefer the command line
In fact I prefer knowing the command line tools and use a GUI, while knowing what it does in the background, because it’s more comfortable and for my main tool (La)TeX I do, but somehow git isn’t easy to understand for me, so I just use the GUI without knowing whats going on an hoping everything will work
Do you know these learning sources? https://www.git-tower.com/learn/git/ebook
Yes I do, but I was a little lazy to read it
I just wanted to add my two cents to the “specific tag vs master” discussion. I always used master for the longest times. Now that I have more kirby projects it became impossible to remember at what state each master branch is. Combine that with one especially hacky panel field and git pull
and the chaos is perfect.
Only recently I switched to checking out tags instead. This has multiple advantages:
git fetch
and git checkout tag
whenever there is a new releaseSomehow I feel way more comfortable updating now
P.S: Read the git documentation when you have a free minute. It is well written and easy to follow. And maybe one day we’ll stop encountering people that delete folders and clone anew once there’s a merge conflict or anything else going “wrong”