diff options
author | 2013-06-07 23:02:29 +0000 | |
---|---|---|
committer | 2013-06-07 23:02:29 +0000 | |
commit | cb6e0a6723c8b7b0a0940a5195d8251c29f5403c (patch) | |
tree | 408663bfc3afce05c3ebf029e53d8ea7f842366e | |
parent | 148a0acb52ff314f91daa54019ea5b03981c6d3e (diff) |
Added a comment
-rw-r--r-- | doc/forum/help_running_git-annex_on_top_of_existing_repo/comment_4_2dfda33ffa39b92b16c8bd9005e1cefe._comment | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/forum/help_running_git-annex_on_top_of_existing_repo/comment_4_2dfda33ffa39b92b16c8bd9005e1cefe._comment b/doc/forum/help_running_git-annex_on_top_of_existing_repo/comment_4_2dfda33ffa39b92b16c8bd9005e1cefe._comment new file mode 100644 index 000000000..e9f22adfd --- /dev/null +++ b/doc/forum/help_running_git-annex_on_top_of_existing_repo/comment_4_2dfda33ffa39b92b16c8bd9005e1cefe._comment @@ -0,0 +1,21 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawl9J51AO9t75xN5k0sJgg8taUo4y0a4hpQ" + nickname="Daniel" + subject="comment 4" + date="2013-06-07T23:02:29Z" + content=""" +I'm trying to find a way to prevent developers from adding certain file types to the main repo. Is there something like a pre-add hook that could be used? + +I found this in another forum but I'm not sure how it was intended to be implemented. + +``` +git check-attr addtoannex \"$FILE\" | grep -q \": set$\" +if [ $? -eq 0 ]; then + git annex add \"$FILE\" +else + git add \"$FILE\" +fi +``` + +[http://git-annex.branchable.com/forum/Let_watch_selectively_annex_files/](http://git-annex.branchable.com/forum/Let_watch_selectively_annex_files/) +"""]] |