-
Notifications
You must be signed in to change notification settings - Fork 2
Git操作 Git push
bin4xin edited this page May 5, 2022
·
2 revisions
- Linux / Windows (windows Git Bash)
git add .
git commit -m "[`date +%Y/%m/%d/%T`]<[操作:移除/修复/更新/etc..]::本次上传修改的文件/.DS_Store>: commit by `git config --global --list|grep user.name|awk -F"=" '{print $2}'`"
# [`date +%Y/%m/%d/%T`]Linux时间戳;
# <移除::.DS_Store> 需要修改的;思路为:<[操作:移除/修复/更新/etc..]::本次上传修改的文件/.DS_Store>
# commit by `git config --global --list|grep user.name|awk -F"=" '{print $2}'` 取出操作人
git push
#从远程仓库抓取修改
git fetch
#合并修改的远程仓库到本地
git merge
git add .
git commit -m "[`date +%Y/%m/%d/%T`]<更新:`Git操作-Git-push.md`:>: commit by `git config --global --list|grep user.name|awk -F"=" '{print $2}'`"
git push
- Git在IDEA中似乎不能包裹命令提交、推送;
- 添加模版加上时间戳;
TIPS:
全新的仓库若希望修改默认的master分支可以:
git branch -M main
修改分支名称master为main。
echo "# ladder" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:Bin4xin/ladder.git
git push
wiki 贡献者 Bin4xin • feifei1606 • codecat