Files
soul-yongping/next-project/quick-push.sh
2026-02-09 14:43:35 +08:00

50 lines
1.1 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Soul创业实验 - 快速上传到GitHub脚本
# 使用方法:./quick-push.sh "提交信息"
cd "/Users/karuo/Documents/开发/3、自营项目/一场soul的创业实验"
echo "🚀 开始上传到GitHubsoul-content分支..."
echo ""
# 检查是否有更改
if [ -z "$(git status --porcelain)" ]; then
echo "✅ 没有需要提交的更改"
exit 0
fi
# 添加所有更改
echo "📦 添加所有更改..."
git add -A
# 获取提交信息
if [ -n "$1" ]; then
commit_msg="$1"
else
echo "💬 请输入提交信息(留空则使用默认信息):"
read commit_msg
if [ -z "$commit_msg" ]; then
commit_msg="update: 更新内容 $(date '+%Y-%m-%d %H:%M:%S')"
fi
fi
# 提交
echo "📝 提交更改..."
git commit -m "$commit_msg"
# 推送
echo "🚀 推送到GitHub..."
git push origin soul-content
if [ $? -eq 0 ]; then
echo ""
echo "✅ 上传完成!"
echo "📝 提交信息:$commit_msg"
echo "🔗 查看https://github.com/fnvtk/Mycontent/tree/soul-content"
else
echo ""
echo "❌ 上传失败,请检查网络连接或权限"
fi