Git #4

4名無しさん@Next2ch:2015/03/14(土) 23:31:14.04 ID:36hBr7hV

function git_save_quick(){
git commit -am "Saved at $(date +"%Y %m %d %A %R:%S %p %s")$1"
function git_save_partial_choose_what_to_commit(){
[ "$1" == "" ] && echo "give a file name to save bits but not all of" && ret
[ ! -f "$1" ] && echo "give a file name that exsists" && return;
echo " Usage : will ask what you want to stage. You can:"
echo " hit [s] to split whatever change into smaller chunks."
echo " unchanged line in the _middle_ of the hunk is where hunk will
be split."
echo " Will not work if there is not any such line."
echo " hit [y] to partial save (stage) that chunk"
echo " [n] to ignore (not stage) that chunk"
echo " [e] to manually edit"
echo " [d] to exit or go to the next file."
echo " [?] to get the whole list of available options."
git add -p "$1"
git diff --cached
function git_save_append_more_changes_to_most_recent_commit(){
git commit --amend