0

I've java project which generates html files in directory path main_project/target/cucumber_output/

I need to check in only these html files and nothing more. But when I create gh-pages branch on main_project it does check-in target/cucumber_output folders as well.

I need to check in only all the files under cucumber_out, how to do that ?

Thanks in advance.

Regards, Vikram

vikramvi
  • 3,312
  • 10
  • 45
  • 68

2 Answers2

0

You need to create a .gitignore file and add all files except cucumber_output folder. Your .gitignore file should looks like:

/*
!main_project/target/cucumber_output
!.gitignore

An optional prefix ! which negates the pattern; any matching file excluded by a previous pattern will become included again. If a negated pattern matches, this will override lower precedence patterns sources.

Possibly duplicate of this & this !

Community
  • 1
  • 1
Sajib Khan
  • 22,878
  • 9
  • 63
  • 73
0

https://srackham.wordpress.com/2014/12/14/publishing-a-project-website-to-github-pages/

This explains requirement I would like to implement.

Also I have referred to unignore a subdirectory as per

.gitignore exclude folder but include specific subfolder

Community
  • 1
  • 1
vikramvi
  • 3,312
  • 10
  • 45
  • 68