git小操作汇总

DBC 1.7K 0

拉取develop分支操作

git clone -b develop 你的仓库地址

git错误解决:error: You have not concluded your merge (MERGE_HEAD exists).

温馨提示

git 代码本地提交后,同步时发生冲突导致合并失败,报以下错误:

error: You have not concluded your merge (MERGE_HEAD exists). hint: Please, commit your changes before merging. fatal: Exiting because of unfinished merge.

git merge --abort
git reset --merge
git pull

查看git提交代码行数

git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done | sort -k7,7rn

查看git提交次数

git log --pretty='%aN' | sort | uniq -c | sort -k1 -n -r

发表评论 取消回复
表情 图片 链接 代码

分享