Hi there...
I made this gists for my personal note as I keep on forgetting commands. Perhaps it may be useful for you too. Feel free to leave your comments.
Assume you already know the command to create tar gz archive. Here is the command to include a hidden file and exclude a list of files and folders.
$ tar -zcvf ../myfile.tar.gz * .one_hidden --exclude-from=../myexclude.listapogee@usbdev:~/Documents/tartest$ du -ah
0 ./dirtozip/dir1/in_dir_1_a.x
0 ./dirtozip/dir1/in_dir_1_b.x
4.0K ./dirtozip/dir1
0 ./dirtozip/file2.abc
0 ./dirtozip/dir2/my_file_2.xyz
0 ./dirtozip/dir2/my_file_3.xyz
0 ./dirtozip/dir2/my_file_1.xyz
0 ./dirtozip/dir2/my_file_4.xyz
4.0K ./dirtozip/dir2
0 ./dirtozip/file1.abc
0 ./dirtozip/.one_hidden
0 ./dirtozip/.two_hidden
12K ./dirtozip
16K .apogee@usbdev:~/Documents/tartest/dirtozip$ cat ../myexclude.list
dir1
file1.abc
dir2/my_file_3.xyzapogee@usbdev:~/Documents/tartest/dirtozip$ tar -zcvf ../myfile.tar.gz * .one_hidden --exclude-from=../myexclude.list
dir2/
dir2/my_file_2.xyz
dir2/my_file_1.xyz
dir2/my_file_4.xyz
file2.abc
.one_hiddenapogee@usbdev:~/Documents/tartest/dirtozip$ tar -tf ../myfile.tar.gz
dir2/
dir2/my_file_2.xyz
dir2/my_file_1.xyz
dir2/my_file_4.xyz
file2.abc
.one_hidden- The file
.one_hiddenis an example of including one hidden file.