简体   繁体   中英

Git post commit and bash on windows

I want to copy all the *.obj files (ignored by the git, but present in the directory) after commit to a directory.

With this script:

#!/bin/sh
pwd
branch=$(git rev-parse --symbolic --abbrev-ref HEAD)
echo logging objfiles for $branch
mkdir -p ./OBJ_$branch/
cp -u -f -r *.obj ./OBJ_$branch/

Git says after commit, that "Cannot stat *.obj"

Ia aware of different endlines and this file is saved using PSPad with linux endlines.

Thanks for any help!

pwd prints the correct directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM