Closed andywenk closed 7 months ago
Hi,
Whether or not GitBook Editor commits your changes automatically on saving depends on your settings. Check in the editor settings if automatic commits are enabled. If not, you have to commit manually after saving.
You can add/remove files from the editor itself. In the file tree view, right click and choose upload files or upload folders.
Guess if you copy the files to the folder outside the editor, you need to run a git add
manually after.
Cheers, Imre
@nagim,
thanks for your answer. I am aware how to add files inside the editor. But as I described and as you mentioned in the second part of your comment, I am not able to understand, how to add files outside the editor - means directly in the repo locally.
What I am faced with now, is to figure out, where GitBook is placing the files on my local HD. To circumvent all these hassles, I have created a book on gitbook.com and cloned it. Added all the stuff I need (I am at the beginning, so no problem) and pushed it. Everything is fine. BUT - where can I see in GitBook where the files are placed locally. I have a guess, because a new directory was created (I changed the settings for GitBook). But the files there are not corresponding with what I see in the editor.
Sorry, but this is really strange. I am mostly working on the command line so if the result of what I see is different to what I expect is breaking my brain ;-)
Thanks for further hints. If this behaviour is considered a bug, I am happy to open a new issue with a consolidated description.
Cheers
Andy
EDIT:
I have finally found the checked out files. They are somehow cached or something. No idea. But changing a file directly in the repo, saving it and git adding it will not be visible in the editor. Even worse, when I sync in the editor, the changes are unstaged and revoked (!?). But changing a file locally, adding it and commiting it will finally also be visible in the GitBook editor.
Imho - this behaviour is a bug. I am not sure how "sync" is implemented (I guess it is a git pull) but it should definitely not erase changes I already added locally. This behaviour does collide with the git idea. It should create a conflict that has to be resolved.
So much this.
I sometimes use Notepad++ (or other editors). When opening the Gitbook Editor, I don't want previous work to be erased/unstaged without any warning. Even code files (cpp/hpp) are reverted!
This is very bad, and is a deal breaking "feature".
Just getting started using gitbook editor and ran across this behavior. Gitbook editor has a bad functionality (inconsistent with other editors I have ever used) and should be fixed.
User story
+1
Here's a screenshot of the bug:
This is a really annoying behaviour (bug) on a really useful and otherwise really nice tool!
+1 for this bug to be fixed.
Are no-one working on this for the moment??
IMHO this is so bad that I cannot understand how it was released as a stable version. This was driving me crazy, until I found this post (and #1145).
Like @kentf mentioned, this also seems to affect non-gitbook files. It actually just seems like it reverts to the latest commit in the repo. I cannot understand how on earth anyone thought that that was a good idea?
@Spiralis I understand the frustration here. It's the result of an early technical decision to work with the GIT API.
The GitBook Editor only works with files in the GIT history. We are working on fixing this ( https://github.com/GitbookIO/feedback/issues/101).
Thanks @SamyPesse. I am very happy to hear that this is being addressed 😄 👍
Hi there,
first of all thanks a lot for creating GitBook. I really can't wind my head around this thing. Here are the steps I did:
This reads like a newbie wrote some explanation and that's per intention. I am very familar with git and understood, that GitBook is creating automatic commits, when a page is saved. But why do I not see the changes in the physical file. This is very confusing for me and I do not understand the concept.
User Stories:
"As an editor I want to change or add files (.md, .jpg and so on) at the physical location of the used git repository for GitBook. I want to see these changes immediately in the GitBook editor."
"As an editor I want to change or add files (.md, .jpg and so on) in the GitBook editor and see these changes immediately in the used git repository."
Do I miss something here?
Thanks and all the best
Andy