Information Technology Reference
In-Depth Information
$ cd 13-12
$ git init
Create an empty initial revision with:
$ git commit --allow-empty -m "Initial commit"
Now create the directories src/ and doc/ and commit some files in them:
$ mkdir src
$ echo "/* code */" > src/main.c
$ mkdir doc
$ echo "<DOCTYPE html>" > doc/index.html
$ git add -A
$ git commit -m "Source code and documentation"
Finally create some tests in the Test/ directory:
$ mkdir Tests
$ echo "/* tests */" > Tests/TestMain.c
$ git add -A
$ git commit -m "Tests"
Now your project contains three directories: src/ , doc/ , and Tests/ . The files
stored in src/ and doc/ are important to the users of your project. The files stored in
the Tests/ directory are only important to the developers who contributed to your
project. They are not important to anyone who would want to use your project.
Create the file named .gitattributes with the following contents:
/Tests/ export-ignore
/.gitattributes export-ignore
You can do this with the following commands:
$ echo "/Tests/ export-ignore" > .gitattributes
$ echo "/.gitattributes export-ignore" >> .gitattributes
Commit this file with:
Search WWH ::




Custom Search