git 雜記

*批量添加:  git add -A git

*只顯示一行的log信息:  git log --pretty=onelinegithub

*將經常使用的log加入alias, git config --global alias.hist 'log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'orm

這樣,就能夠實用git hist 打印logget

 

*除了某種類型的文件,忽略某個文件夾, 如忽略foo文件夾下除了*.cpp 的文件, 在.gitignore 中添加以下代碼it

!/fooio

/foo/*form

!/foo/*.cppmodule

參考: http://git-scm.com/docs/gitignoredate

 

#git fork update文件

https://help.github.com/articles/fork-a-repo

#fatal: Needed a single revision, 更新submodule的時候出錯

刪除submodule文件夾,git submodule update --init

相關文章
相關標籤/搜索