2018年7月15日 星期日

Android Studio 'no device connected' 問題解決

1.Android phone
-> 在setting中 點選手機版本5次 , open 開發者選項 ,將裡面的 debug mode打開


2.Android Studio
->在tools選項中, 選SDK manager ,選 SDK tools,安裝 google usb driver


3.Windows OS
-> 安裝 adb driver (http://adbdriver.com/downloads/)

2018年6月20日 星期三

linux 搜尋

該folder底下文字搜尋(包含檔案內的字眼): grep -r <search_word>  *


搜尋檔名: find . -name "*<search_word>*"

2018年5月24日 星期四

Git 刪除 branch

使用Git Bash here(right click on folder):
git checkout master

git branch -d XX_app
(check  the delete action:git branch ,  force delete: -d to -D ) 

git push origin --delete XX_app

如果發生 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @


ssh-keygen -R 10.10.10.10 解決

再重新  git push origin --delete XX_app

Git 舊資料發生問題


git push origin --delete WW_App

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is

解法:  ssh-keygen -R 10.10.10.10

Git 舊資料 push 到 新的IP or repository

Git 舊資料發生問題:
git push origin --delete WW_App

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is

解法:  ssh-keygen -R 10.10.10.10

Git 舊資料 push 到 新的IP or repository:

改repo位置
git remote set-url origin alex_lin@10.8.70.22:/data/git/Demo_app

確認成功與否
git remote -v

使用TotoriseGit or Git bash ,創造新的branch ,再切換到該branch

只需再push 上傳到git server(不需commit) ,因為push 可將 commit log 紀錄帶上去