GIT Confusion

This forum is for all Flare issues related to using Source Control.
Post Reply
ghillerson
Propeller Head
Posts: 85
Joined: Wed Mar 05, 2014 10:22 pm
Location: Near Santa Cruz, CA
Contact:

GIT Confusion

Post by ghillerson »

I'm really struggling with GitHub integration in Flare. I'm using Flare 12, and have successfully set up 3 projects in Git, each in its own repository. Once this is working, everything is great: commits, pushes, pulls, etc all work just as they should, and it's great.

The problem is that when I try to set a new project up and bind it to a new repository, I go through hours of frustration and confusion. It's even worse trying to bind an existing project, which I've give up on trying to get working. This is true on both my Windows 7 Pro desktop PC, and on my Windows 10 laptop PC):

1. Created a new repository in Git called Newbook, and copied its URL to my clipboard.
2. Created a new project in Flare, and told it to bind to source control.
3. In the bind dialog, specified my remote repository and then my user ID and password.
4. When I try to interact with the repository, Flare complains:
Remote already contains another project. Please pull from an empty remote.
Pushing untracked branch Preliminary...
Destination already in use by another project. Please push to an empty remote.

The source control operation finished with warnings and/or errors. Press Close when you are done reviewing the messages.
5. That is, of course, impossible, given that it's a brand new repository on Git.

Does anyone have a steplist I can follow (and record for future use) to get a new project working with a new Git repository. This should be simple!
ghillerson
Propeller Head
Posts: 85
Joined: Wed Mar 05, 2014 10:22 pm
Location: Near Santa Cruz, CA
Contact:

Re: GIT Confusion

Post by ghillerson »

Okay, well I finally got it to work, and may have a clue: when you create a new repository (repo) in GitHub, Git encourages you to create a read me in the repo.

I had tried deleting that readme in Git, but Flare still wouldn't sync with that repo. I then tried creating a public repo instead of the private one I'd been using; though this didn't make sense to me, I tried it anyway, to no avail. Then it occurred to me that I needed to create a repo without the readme file. I created a new, public repo, reopened my project, and told Flare to push to it. Flare crashed.

However, when I reopened the project, Flare synced with the GitHub repository and now seems to be working fine. I made the repo private on Git, and it is still syncing fine from within Flare. Problem solved, at least for this project.

Sure would be nice to have someone from MadCap provide enough information to be able to solve these problems without spending hours with a shoot-in-the-dark, trial/error approach. Once working, the source control from within Flare is great, but getting it working is troublesome. I watched Paul Pehrson's webinar a few weeks back and he made it seem easy, but I later saw comments implying that it's not worth the time/effort to try Git directly from Flare, and recommending that we use a tool like SmartGit instead. Maybe a good idea, but learning yet another tool is not what I want to do.
stownsendaw
Jr. Propeller Head
Posts: 7
Joined: Tue Nov 17, 2015 12:22 pm

Re: GIT Confusion

Post by stownsendaw »

We've had a ton of issues with Git integration as well.

We use Stash + SourceTree. Binding through Flare's import feature leads to horrible performance, whereas cloning through Stash is just fine.

In general the support I've received when I call isn't very helpful. To most it sounds like they know there are Git issues but are quick to pin them on local work environments, networks, infrastructure, etc. TFS worked great for years, and if it wasn't for our dev teams forcing us to move to Git I'd still be using that. Just wish Git worked as well in Flare as TFS did.
Louise Bennett
Propeller Head
Posts: 81
Joined: Mon Apr 04, 2016 7:53 pm

Re: GIT Confusion

Post by Louise Bennett »

@stounsendaw - I'm interested to know more about your experience as it sounds very similar to ours.

I created a Flare project and populated it with a lot of content from our old authoring platform. I then bound the project to a GIT repository (STASH), and since then the performance has been horrendous. Committing changes can take 1/2 hour if it works at all.

I am thinking of unbinding and deleting the local project and then cloning the project as you suggest, but wondered if you could tell me more about the performance improvements you've seen.

Thanks, Louise.
ghillerson
Propeller Head
Posts: 85
Joined: Wed Mar 05, 2014 10:22 pm
Location: Near Santa Cruz, CA
Contact:

Re: GIT Confusion

Post by ghillerson »

I switched to using Sourcetree w all my Flare projects, and everything is now easy and straightforward.

MadCap is supposedly working on improvements,
but I prefer knowing my source control is flawless.
Louise Bennett
Propeller Head
Posts: 81
Joined: Mon Apr 04, 2016 7:53 pm

Re: GIT Confusion

Post by Louise Bennett »

Thanks for that. Can you let me know your workflow? For example, I am guessing it is something like this:
1. Create or edit topic in Flare and Save. (Icons indicate the topic has changed)
2. Open SourceTree and commit changes??
3. Icons in Flare disappear indicating that the content is in sync with the remote reository.

I am thinking that our authors will only want to do this periodically throughout the day rather than after every changed topic, so they will possibly also have to deal with merge conflicts but I have heard that SourceTree is pretty good for that.

Thanks, Louise.
ghillerson
Propeller Head
Posts: 85
Joined: Wed Mar 05, 2014 10:22 pm
Location: Near Santa Cruz, CA
Contact:

Re: GIT Confusion

Post by ghillerson »

Yes to everything, except one (your #3): I unbund the projects from source control in Flare, and Flare this does not know things are in sync. I depend on Sourcetree for that. If you're bound to A GIT repo in Flare, I don't think things can work as we wish.

G
Louise Bennett
Propeller Head
Posts: 81
Joined: Mon Apr 04, 2016 7:53 pm

Re: GIT Confusion

Post by Louise Bennett »

Ah, OK. I think I get it. So in effect you're not using any Flare SC elements at all. Flare is just the UI to edit the contents actually stored in the cloned Git repository and SourceTree does the rest.

Thanks. I'll give it a try.

Louise.
stownsendaw
Jr. Propeller Head
Posts: 7
Joined: Tue Nov 17, 2015 12:22 pm

Re: GIT Confusion

Post by stownsendaw »

Yea, sorry for the late response.

So what we do is clone from Stash, which launches SourceTree and asks us where to copy the project. We then edit the .flprj (in Notepad) to only include SourceCtonrolBound="true" and SourceControlProviderType="Git".

<?xml version="1.0" encoding="utf-8"?>
<CatapultProject Version="1" xml:lang="en-us" Comment="This template provides several starter topics (e.g., cover, front matter, chapters, glossary, index) and other files to help get you started with your own project, with Adobe PDF as the primary output format. It is a good choice if you plan to generate print-based documentation primarily, although you can also generate online output from the project." SourceControlBound="true" xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MasterPageLayout="/Content/Resources/PageLayouts/AirWatch_PDF.flpgl" SourceControlProviderType="Git" MasterStylesheet="/Content/Resources/Stylesheets/Styles.css" MasterStylesheetOverride="True" />

These get added if you bind through Flare's interface, but you can also just add them manually after you bind with SourceTree.

Binding through SourceTree and binding through Flare both create .git folders (hidden by default in Explorer), but they are different. For some reason whatever SourceTree creates gives us fewer issues but still allows us to use the built-in source control features compared to whatever Flare creates.

But as stated previously if you're a single writer or small team I'd just use SourceTree as your mechanism for pull > commit > push.
Neil H
Jr. Propeller Head
Posts: 2
Joined: Fri Apr 14, 2017 2:20 pm

Re: GIT Confusion

Post by Neil H »

I found this thread via Google; it was the one and only result of a Google search for "Remote already contains another project. Please pull from an empty remote."

What triggered the message in my case was a more basic user error, related (I think) to feature branch creation from within Flare.

I created a feature branch for an existing Flare project and then closed Flare before doing a Push to my remote repository. When I later reopened the project, I instructed Flare to do a 'Pull', and that's when I saw the message. After doing a 'Push', the issue seems to have been resolved for me.

The scenario described by the OP was creating an entirely new Repository in GIT. Perhaps the underlying issue is related, I'm not sure.
TimElhajj
Jr. Propeller Head
Posts: 4
Joined: Mon Aug 28, 2017 3:21 pm

Re: GIT Confusion

Post by TimElhajj »

Neil H wrote:I found this thread via Google; it was the one and only result of a Google search for "Remote already contains another project. Please pull from an empty remote."

What triggered the message in my case was a more basic user error, related (I think) to feature branch creation from within Flare.

I created a feature branch for an existing Flare project and then closed Flare before doing a Push to my remote repository. When I later reopened the project, I instructed Flare to do a 'Pull', and that's when I saw the message. After doing a 'Push', the issue seems to have been resolved for me.
This is what happened to me.

I Googled, found this topic, and realized I had created a local branch and was trying to pull it from the server (but hand't pushed it there yet).
chrispitude
Propeller Head
Posts: 58
Joined: Thu Mar 23, 2017 12:23 pm

Re: GIT Confusion

Post by chrispitude »

stownsendaw wrote:We've had a ton of issues with Git integration as well.

We use Stash + SourceTree. Binding through Flare's import feature leads to horrible performance, whereas cloning through Stash is just fine.

In general the support I've received when I call isn't very helpful. To most it sounds like they know there are Git issues but are quick to pin them on local work environments, networks, infrastructure, etc. TFS worked great for years, and if it wasn't for our dev teams forcing us to move to Git I'd still be using that. Just wish Git worked as well in Flare as TFS did.
Louise Bennett wrote:@stounsendaw - I'm interested to know more about your experience as it sounds very similar to ours.

I created a Flare project and populated it with a lot of content from our old authoring platform. I then bound the project to a GIT repository (STASH), and since then the performance has been horrendous. Committing changes can take 1/2 hour if it works at all.
The Flare 2017 r3 release notes (http://kb.madcapsoftware.com/Content/Fl ... _Notes.htm) list the following fix:

130108 Large Project's Performance is Extremely Slow When Bound to Git Source Control: Git

I would be curious to know how well Git-bound projects now perform compared to TFS-bound projects.
Post Reply