How to Remove Last Commit From Local and Remote Git Repository Linux GIT Github 1 minute to read (143 words) ( 0 Comments ) Sometimes by mistake we push commits on remote branch. I’ll show you how to remove/delete last commit from local & remote branch. [ mitesh@shah ~] $ git log --pretty = oneline 037d772391792ff85b394e1e43f5f04bb7515e11 Add PrintFriendly Button 8f2cc3d5b585076d6001117703d677e24f07247f Minor Update on Resume 9e57e45fa58caef1eb95d804997bb5f70708d8c8 HTTPS version in Author Bio Now I want to delete last commit 037d772391792ff85b394e1e43f5f04bb7515e11 # Delete last commit [ mitesh@shah ~] $ git reset --hard HEAD^ HEAD is now at 8f2cc3d Minor Update on Resume # Delete last two commits [ mitesh@shah ~] $ git reset --hard HEAD~2 HEAD is now at 9e57e45 HTTPS version in Author Bio [ mitesh@shah ~] $ git push -f Total 0 ( delta 0 ) , reused 0 ( delta 0 ) To git@github.com:MiteshShah/miteshshah.github.io.git + 03...
Postagens
Python com Mysql
- Gerar link
- X
- Outros aplicativos
Uso do conector MySQL Python com Python 3.6.1 (Windows 7 64 bits). 1 - Faça o download do driver PyMySQL-0.7.11 aqui . 2 - Extraia e copie a pasta pymysql dentro do diretorio do Python C:\Users\%usuario%\AppData\Local\Programs\Python\Python36-32\ 3 - Execute o py abaixo: #!/usr/bin/env python import pymysql conn = pymysql . connect ( host = 'localhost' , port = 3306 , user = 'root' , passwd = '' , db = 'sandbox' ) cur = conn . cursor () cur . execute ( "SELECT * FROM users" ) print ( cur . description ) print () for row in cur : print ( row ) cur . close () conn . close () Espero que ajude você em seus projetos com Python, Aproveite!!!