2

Is it possible to use Git only with some files or directories instead of commiting the whole project?

I just created new project in PHP and want to share only one folder but I don't know how to do it.

Timo.Klement
  • 655
  • 1
  • 11
  • 31
  • Add all the files and directories you want to ignore into the `.gitignore` file (if you don't already have one, create one) line by line at the root directory of the git project – karthikr Oct 02 '14 at 10:42
  • Also,http://stackoverflow.com/questions/1279533/is-there-a-way-to-tell-git-to-only-include-certain-files-instead-of-ignoring-cer – karthikr Oct 02 '14 at 12:46

1 Answers1

0

You can either ignore the stuff you don't want to commit, exclude them from commits or just don't add them.

Ignore

Use the .gitignore-file manually or select all files you don't want to commit and right click -> Git -> Ignore -> Ignore.

Exlude

Select the files (as above) and right click -> Git -> Ignore -> Exclude From Commit or exclude them in the commit dialog.

See also

Community
  • 1
  • 1
ollo
  • 24,797
  • 14
  • 106
  • 155