-1

I am new to git and cloned an existing project. I want to then push that into another repo. I noticed that some of my files didn't get added to the repo, I assume they are part of the .gitignore file. I was just wondering, how can I add everything including the skipped files? Thanks.

Or what exactly I need to do so they can be added.

Roshan Br
  • 175
  • 14
User0110101
  • 99
  • 2
  • 10
  • 4
    Possible duplicate of [Force add despite the .gitignore file](https://stackoverflow.com/questions/8006393/force-add-despite-the-gitignore-file) – Yana Agun Siswanto Oct 25 '18 at 11:25
  • "I was just wondering, how do I add everything including them?"—Due to the way GIt's ignore system works this will prevent the files from being ignored moving forward for all copies of the repository using the new code. Is that what you want? – Chris Oct 25 '18 at 12:28
  • 1
    Try running `git check-ignore -v path/to/file`. If the file is actually being ignored you'll get a response showing where the relevant rule was found. If you don't get anything back the file isn't being ignored. – Chris Oct 25 '18 at 12:29
  • Possible duplicate of [How to create .gitignore file](https://stackoverflow.com/questions/10744305/how-to-create-gitignore-file) – Roshan Br Oct 25 '18 at 13:14

1 Answers1

-1

If things are being git ignored - there should be a file within your project called .gitignore - open this and there should be a list of git ignored files - you can either delete file names from the list that you want to commit, or you can use an exclamation mark before the file name to efectively say "don't git ignore this file" example

/bootstrap/compiled.php
/vendor
composer.phar
.DS_Store
!.idea //this wouldn't be git ignored
.env
CodeBoyCode
  • 1,993
  • 9
  • 26
  • Thank you for replying but I can't seem to find it, is it hidden for windows? – User0110101 Oct 25 '18 at 12:14
  • @User0110101 Trying checking the box in the "Change Folder and search oprtions -> View - > Show Hidden Files/ Show hidden file Extensions" and you should be able to see the file in git repo (root level). – Roshan Br Oct 25 '18 at 13:11
  • yes the file is hidden - what code editor do you use? usually the each have a configuartion for showing hidden files and folders within the file structure - if you want to go through it using file explorer the solution is as commented by @RoshanGupta above – CodeBoyCode Oct 25 '18 at 13:14