git查自己寫了多少代碼
git log --author="your name" --pretty=tformat: --numstat | grep ".java" | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -
把已經(jīng)存在的項目上傳到github步驟如下:
在github上新建一個空的項目,不需要ignore和readme文件
cd進(jìn)入本地項目,執(zhí)行以下步驟就可以把項目上傳到github上啦
* git init
* git add .
* git commit -m "first commit"
* git remote add origin git@github.com:Windsmild/MyCloud.git(項目地址)
* git push -u origin master
查看本地和遠(yuǎn)程關(guān)聯(lián)分支
git branch -vv
git分支根據(jù)commit順序排序
git branch --sort=-committerdate # DESC
git branch --sort=committerdate # ASC