cypress upload to github does node_modules needed? - github

does "node_modules" folder required when I upload the cypress folders to github?
i am very new to this and wonder if my teammate can run the test at his machine without downloading the "node_modules".

You can create a file called .gitignore and mention node_modules there. Then when you are uploading your project to GitHub, everything that is mentioned in .gitignore would be ignored for upload. It is not advised to upload the node_modules folder to git. This is how my gitignore looks like for my project:
Now if your teammate wants to execute the test, they can just run the command npm install. It will install download all the dependencies from the package.json file and will automatically create a node_modules folder in their machine.

Related

Including a subfolder from an excluded folder in .gcloudignore

I'm trying to deploy a Node project with a Dockerfile to Google Cloud Run with the gcloud beta run deploy command.
Long story short, I would like to copy my local node_modules/my-module after running RUN npm install in the Dockerfile:
COPY node_modules/my-module /app/node_modules/my-module/
(I only do this while in development, to avoid committing and pushing every change from my-module for testing).
Unfortunately, Docker cannot copy this directory since, apparently, node_modules is not uploaded to Cloud Build by default.
So I created this .gcloudignore file to override the default:
.gcloudignore
.git
.gitignore
node_modules/
!node_modules/my-module/
I've tried a lot of other syntaxes but none allowed me to exclude node_modules while including node_modules/my-module.
However, I can include the whole node_modules directory by omitting it from the .gcloudignore file, but this obviously takes forever to upload.
Do you know how I could upload my local module to Cloud Build?
After reading this Gist's comments, I realized you have to also include the parent directories, like so:
node_modules/**
!node_modules/
!node_modules/my-module/**
This will exclude all subfolders from node_modules except my-module and its content (the ** is important, otherwise only the empty folder would be included).

Github desktop caches deleted local repository

I'm new at GitHub and I'm having this issue: I created three private repositories for my project, all fine. On the fourth one, for some reason GitHub desktop included the node_modules folder (its an angular cli app), so I deleted the repository from GitHub.com and from GitHub desktop. When I try to recreate it, it is "cached" on my Mac, even if I copy everything to another folder, and it tries to upload the node_module files.
I also changed the name of the repository, copied all the files but node_modules folder to another folder. Same happens over and over.
I couldn't find anything on internet about this. Sorry if its a newbie question.
You could try to delete the git folder that it's being hidden by default.
Go to in file explore -Views- select "Hidden Items" and try to remove the git folder from here. After that set up your .gitignore file and pass node_modules before you use git init
Use this in your terminal, if you are using VS Code use this in the same folder you are having the problem : git config --global core.excludesfile '~/.gitignore'

How to download git ignored folders and files from github

Am trying to download node_modules from github inorder to install it in an offline machine,
What i did was just froked a repository and deleted the .gitignore file and tried downoad the zip file again,but still not getting node modules
Is it possible to download ignored folders from github?
No. The node_modules folder, as it is ignored, is not even saved in git. There's nothing you can do to download it with the rest of the repository, just run npm install or yarn. As the machine in question isn't connected, you'll naturally have to do this on an internet-connected machine.

ignoring the build folder in an eclipse project in git repo

I am using eclipse java as an editor and would like to use the .gitignore to exclude the build folder for the project. This is what I have currently written in my .gitignore. The syntax seems to be right; I used the git documentation but I may have interpreted it wrong.
#ignoring the files within the build folder
/build/
build/**
I'm using a brand new repo so I shouldn't have any problems with already logged files in the repo.
I am trying to get git to ignore the build folder in the project file using a .gitignore. The ignore file didn't work. What could be a solution?
The way the .gitignore is written, this file needs to be in the same subfolder as the build folder, the file being ignored.

Install: GitHub gamejs

I started today working with gamejs for a small project. I saw that most project are repository files on github dot com, so I downloaded the github for windows and the git bash.
Then I used git bash to clone gamejs repository. I proceed the same with some repository stuff. However, it seems that I forget to install something... because I cannot start the server, I have gjs-server.sh or .cmd missing. The bash doesnt recognize the command. What will I do?
Since you cloned the code instead of downloading the release tarball you need to build GameJS first:
Change into the GameJs directory
cd gamejs
Get all needed submodules with git:
git submodule init git submodule update
Compile RingoJs:
ant -f ./server/ringojs/build.xml jar
EDIT: Prior to building you need to install Apache Ant build tool. Since it is a Java application to install it just download the binary distribution from their download page and unzip it.