git一鍵提交修改文件


git一鍵提交修改文件

 首先安裝git, 有git bash; 新建一個gitcmt文件,放置於與你的項目同級的目錄里;

使用:打開git bash,

方法1. git pull\git status\ ../gitcmt "mycommit"(提交備注);依次輸入三條命令;

方法2. git pull\git status\ gitcmt "mycommit"(提交備注); 前提把gitcmt文件所在路徑加入到環境變量的path路徑里,提交時依次輸入即可。

 

gitcmt文件

文件名:gitcmt

內容:

#!/bin/bash
currDir=$(pwd)
remark=$1
if [ ${remark}x = ""x ];then
remark=$(date +"%Y-%m-%d %H:%M:%S")
fi
echo ${currDir}
git add .
git commit -m "\"${remark}\""
git push

 

至此一鍵提交修改文件已完畢;

git 常用命令行:

git pull

git add .

git status

git commit -m"修改"

git push origin master

git diff

git remote -v 查看remote信息

如何使用git創建項目,創建分支 http://www.cnblogs.com/alice-fee/p/6106064.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM