git reset
, 一直是我沒有弄懂的部分,這篇要多看幾次
- 節錄文章中的說明
- Reset 這個英文單字的翻譯是「重新設定」,但事實上 Git 的 Reset 指令用中文來說比較像是「前往」或「變成」,也就是「go to」或「become」的概念
$ git reset HEAD~2
- 正確的說,上面這個指令應該要解讀成「我要前往兩個 Commit 之前的狀態」或是「我要變成兩個 Commit 之前的狀態」,而隨著使用不同的參數模式,原本的這些檔案就會丟去不同的區域。
git reset
, 一直是我沒有弄懂的部分,這篇要多看幾次
$ git reset HEAD~2
為你自己學 Git,是一本我滿喜歡的 git 書籍,我有買了實體書 & 數位版
這邊筆記一下,我由網站上看到的資料
$ git config --local user.name Sherly
$ git config --local user.email sherly@5xruby.tw
記錄使用 sqlalchemy 透過 PyMySQL 連線到 RDS proxy 遇到的問題
ssl_args = {'ssl': {'use': True}}
echo_sql = True if os.environ.get('SQLALCHEMY_ECHO') == 'true' else False
engine = db.create_engine(conn_sqlalchemy_str, echo=echo_sql, poolclass=NullPool, connect_args=ssl_args)
rds_client.generate_db_auth_token
取得 token,不過連到 DB 還是會出現[ERROR] OperationalError: (pymysql.err.OperationalError) (1045, "Access denied for user 'master'@'172.31.58.218' (using password: NO)")
ssl – A dict of arguments similar to mysql_ssl_set()’s parameters.
主要是這邊的說明aws ec2 describe-network-interfaces --region=us-west-1 --filters Name=addresses.private-ip-address,Values=10.0.0.1
最近在嘗試改用 RDS proxy 來連到 RDS
因為既有的方式來使用 python sqlalchemy 來連結到 db,使用 RDS proxy 時,會遇到些問題
先將目前找到的資料,加以記錄
用 git 的好處,就是可以很方便的建立 & 刪除 branch
就記錄一下,目前有用到的 & 找到的使用 branch 的一些技巧 & 資料
git checkout -b <branch-name>
git push <remote-name> <branch-name>
<remote-name> is typically origin
git push --set-upstream <remote-name> <local-branch-name>
git push -u origin <local-branch-name>
git branch -d <branch>
$ git fetch --prune origin
$ git remote prune <remote>
origin https://gitserver.com/user/repository.git (fetch)
origin https://gitserver.com/user/repository.git (fetch)
`
在使用 AWS 的過程中,因為都是 pay as you go 的,有可能在開發的過程中,就不經意的花了過多的 cost
就試著設定 Cost Anomaly Detection 來試試看