Flare adding gitignore to .gitignore file

This forum is for all Flare issues related to using Source Control.
Post Reply
Carlsen
Propeller Head
Posts: 43
Joined: Fri Apr 08, 2011 2:30 pm

Flare adding gitignore to .gitignore file

Post by Carlsen »

Hi Everyone,

Has anyone noticed this behavior in Flare when biding to GitHub? It defaults to adding the .gitignore file to the .gitignore file every time you do a push. Even if you open the .gitignore file and remove that line, Flare adds it back at the next push.

Does anyone know how to make Flare stop adding this line to the .gitignore? I work on a team that has multiple writers, and I'd like the .gitignore file to be part of my GitHub repository so that they all have the same file with all the same settings. But Flare won't let that happen, so I'm forced to use an outside GitHub client so that I can have this file as part of my repo.

For reference, these are the default Flare .gitignore settings:

Code: Select all

Output
Analyzer
FileSync
Project/Users
.gitignore
**/Thumbs.db
It's ridiculous default behavior like this that makes me really hate Flare sometimes. Any help would be appreciated.

Thanks,
Josh
Carlsen
Propeller Head
Posts: 43
Joined: Fri Apr 08, 2011 2:30 pm

Re: Flare adding gitignore to .gitignore file

Post by Carlsen »

No one?

Maybe no one reading the forum uses GitHub. But the fact that Flare forces the .gitignore file to be in the .gitignore file is a huge problem. Browse any random repository on GitHub, and the odds are good the .gitignore file will be present in the repository.

For Flare users, this is an issue if you're on a team with more than one writer and you have a complex enough setup that you need more than the default Flare .gitignore settings. In my case I'm importing files from another project for master pages, page layouts, etc. so we can make sure all our outputs across all projects look the same. I need to ignore those imported files in any particular project so they are not added to source control for every project. It's easy enough to add these files and folders to the .gitignore, but I can't share them with the team in the repository itself because Flare forces the .gitignore to ignore itself. So I have to pass around the .gitignore file manually to every team member instead of just letting them grab it from the repository like every other file. Insane, but there it is.

I'll file a bug against Flare for this. Someone wasn't thinking very far ahead when they implemented this "feature".
dcisneros
Propeller Head
Posts: 11
Joined: Tue Aug 12, 2014 12:25 pm

Re: Flare adding gitignore to .gitignore file

Post by dcisneros »

Our team is using Git!

Our situation is similar in some respects and different in others. We ran into the issue where we had to manually add the .gitignore file and add those folders you mentioned to the list ourselves because one day, Flare decided to stop ignoring those files and wouldn't let anyone push their changes to the repository. After manually setting that up, we haven't run into anymore issues with it...for now.

I mentioned our issue to a support rep when I went to MadWorld, and I think they plan to create a KB article that covers .gitignore.

Maybe keep an eye out for that?
ajolson
Jr. Propeller Head
Posts: 3
Joined: Tue Sep 20, 2016 10:43 am

Re: Flare adding gitignore to .gitignore file

Post by ajolson »

I agree this is a poor feature design, and filing a bug with Madcap is a good choice.

I've read many bad experiences of Madcap's Git integration, so decided to skip Madcap entirely when it comes to source control. We use the Github windows app for push/pull to the git repo instead. Then we don't have Madcap messing up the .gitignore files.
zeddee
Jr. Propeller Head
Posts: 2
Joined: Mon Apr 10, 2017 2:53 am

Re: Flare adding gitignore to .gitignore file

Post by zeddee »

another .gitignore issue i've run into is that flare insists that the .gitignore must have a specific format, on top of what git expects it to be.
For my case, i've changed it to such:

Code: Select all

#################################################################################
# Placing a # in front of any of the items listed below (e.g., #analyzer) will  #
# allow these items to be pushed to your Git repository. Keep in mind the more  #
# files you push to your repository, the more your performance may be affected. #
#################################################################################

/Output
/Analyzer
/FileSync
/Project/Users
!.gitignore
.svn
**/Thumbs.db

#################################################################################
# Add items to be ignored below                                                 #
#################################################################################

/Project/Targets
only to have flare insert its gitignore statements _again_ on build:

Code: Select all

#################################################################################
# Placing a # in front of any of the items listed below (e.g., #analyzer) will  #
# allow these items to be pushed to your Git repository. Keep in mind the more  #
# files you push to your repository, the more your performance may be affected. #
#################################################################################

/Output
/Analyzer
/FileSync
/Project/Users
.gitignore
.svn
**/Thumbs.db

#################################################################################
# Add items to be ignored below                                                 #
#################################################################################

!.gitignore
/Project/Targets
and again:

Code: Select all

#################################################################################
# Placing a # in front of any of the items listed below (e.g., #analyzer) will  #
# allow these items to be pushed to your Git repository. Keep in mind the more  #
# files you push to your repository, the more your performance may be affected. #
#################################################################################

/Output
/Analyzer
/FileSync
/Project/Users
.gitignore
.svn
**/Thumbs.db

#################################################################################
# Add items to be ignored below                                                 #
#################################################################################

#################################################################################
# Placing a # in front of any of the items listed below (e.g., #analyzer) will  #
# allow these items to be pushed to your Git repository. Keep in mind the more  #
# files you push to your repository, the more your performance may be affected. #
#################################################################################

/Output
/Analyzer
/FileSync
/Project/Users
.gitignore
.svn
**/Thumbs.db

#################################################################################
# Add items to be ignored below                                                 #
#################################################################################

!.gitignore
/Project/Targets

The thing is that I cannot reliably reproduce this -- it seems to be triggered by the way the .gitignore file is formatted (control chars and whatnot perhaps). Anyone else encounter something like this?
oleksandr_kokoshyn
Propeller Head
Posts: 27
Joined: Mon Sep 03, 2018 4:19 am

Re: Flare adding gitignore to .gitignore file

Post by oleksandr_kokoshyn »

Hi,

Has anyone found a way to prevent Flare from changing the .gitignore file?
BrianAtInTouchHealth
Propeller Head
Posts: 51
Joined: Thu Dec 27, 2018 10:35 am
Location: Goleta (Santa Barbara County), CA
Contact:

Re: Flare adding gitignore to .gitignore file

Post by BrianAtInTouchHealth »

dcisneros wrote:We ran into the issue where we had to manually add the .gitignore file and add those folders you mentioned to the list ourselves because one day, Flare decided to stop ignoring those files and wouldn't let anyone push their changes to the repository. After manually setting that up, we haven't run into anymore issues with it...for now.
This works a while for me but for some some unknown reason the .gitignore file keeps getting out of sync with the repository. So, when that happens to me I close Flare, open Git Bash, navigate to the folder, and then enter the following:

Code: Select all

git restore *.gitignore
oleksandr_kokoshyn wrote:Has anyone found a way to prevent Flare from changing the .gitignore file?
Same question.

Brian
Flare :flare: + Analyzer :analyzer: 2022, Central, Capture :capture: 7.0, Mimic :mimic: 8.1
doloremipsum
Sr. Propeller Head
Posts: 290
Joined: Mon Aug 26, 2019 2:11 pm

Re: Flare adding gitignore to .gitignore file

Post by doloremipsum »

I haven't stopped Flare from changing the gitignore entirely, but you can definitely push the file to your repository. Just add a # in front of the .gitignore line.
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.
BrianAtInTouchHealth
Propeller Head
Posts: 51
Joined: Thu Dec 27, 2018 10:35 am
Location: Goleta (Santa Barbara County), CA
Contact:

Re: Flare adding gitignore to .gitignore file

Post by BrianAtInTouchHealth »

BrianAtInTouchHealth wrote:This works a while for me but for some some unknown reason the .gitignore file keeps getting out of sync with the repository. So, when that happens to me I close Flare, open Git Bash, navigate to the folder, and then enter the following:

Code: Select all

git restore *.gitignore
Since upgrading to Flare 2020 I still have the issue but I don't have the syncing issue and I don't have to use Git Bash.

Brian
Flare :flare: + Analyzer :analyzer: 2022, Central, Capture :capture: 7.0, Mimic :mimic: 8.1
oceanclub
Sr. Propeller Head
Posts: 277
Joined: Thu Oct 10, 2013 4:45 am
Location: Dublin

Re: Flare adding gitignore to .gitignore file

Post by oceanclub »

Has Flare 2020 changed the way it treats .gitignore? I noticed that this file was being _constantly_ updated in one of our projects, and I'm thinking it is because one colleague has not updated from Flare 2019 and it treats .gitignore differently. For example, if I have the following .gitignore:

Code: Select all

#################################################################################
# Placing a # in front of any of the items listed below (e.g., #analyzer) will  #
# allow these items to be pushed to your Git repository. Keep in mind the more  #
# files you push to your repository, the more your performance may be affected. #
#################################################################################

/Output
/Analyzer
/FileSync
/Project/Users
/.svn
**/Thumbs.db
/.gitignore

#################################################################################
# Add items to be ignored below                                                 #
#################################################################################
And then open the project in Flare 2020, I get:

Code: Select all

#################################################################################
# Placing a # in front of any of the items listed below (e.g., #analyzer) will  #
# allow these items to be pushed to your Git repository. Keep in mind the more  #
# files you push to your repository, the more your performance may be affected. #
#################################################################################

/Output
/Analyzer
/FileSync
/Project/Users
/.svn
**/Thumbs.db

#################################################################################
# Add items to be ignored below                                                 #
#################################################################################

/.gitignore

That is, Flare 2020 forces git to ignore .gitignore.

However, that does not seem to be git standard practise. But either way Flare suddenly seems to be imposing a policy here?

P.
doloremipsum
Sr. Propeller Head
Posts: 290
Joined: Mon Aug 26, 2019 2:11 pm

Re: Flare adding gitignore to .gitignore file

Post by doloremipsum »

Flare has always done that - it's a little unclear from how the text is phrased, but all of the files/directories in both lists are being ignored (some, like the Analyzer, for very good reason). The difference seems to be whether the .gitignore is placed in the lower panel or in the middle one, but that won't be a practical difference.

As I noted above, you can stop Flare from blocking the gitignore by putting a # at the start of that line. Maybe at the start of both lines in this case, not sure.
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.
elisa-cdk
Jr. Propeller Head
Posts: 5
Joined: Thu Jun 11, 2020 10:01 am

Re: Flare adding gitignore to .gitignore file

Post by elisa-cdk »

I think Flare stopped adding gitignore to the .gitignore file - possibly in Flare 2020r3.

We're now having a terrible time sharing projects because although all the .gitignore files have the same text in them, they are never in synch with the repo and have to be merged.

Now I have to get all the writers to update the .gitignore file, though that's not a huge price to pay for resolving all the problems you guys listed above.
Post Reply