0

I need to change a set of files before pushing them to repo...
Approach I'm using works in a way that it leaves commit in the loop 'un-pushed' so i need to manually push again with -forced tags..

for i in files; do
   edit $i
   git add $i
   git commit  -o $i -n -m "Updated ..."
   git tag $TAG -f
done

exit 0

Tried to ammend previous commits, but failed on this one as well.
Is there a way this would push everything as i would expect:

if pre-push exits with 0, files are pushed...

4

1 回答 1

0

好的,所以我通过使用别名解决了它:

git config --global alias.t '!/path/to/above/script'
于 2013-10-03T17:01:21.927 回答