git – Disable “LF will be replaced by CLRF” warning in Git on Windows

  warning: LF will be replaced by CRLF in www/index.html.The file will have its original line endings in your working directory.warning: LF will be replaced by CRLF in www/index.phpThe file will have its original line endings in your working directory….   git config –global core.safecrlf false  

git – My aliases

  alias gs=’git status’ alias gl=’git log –name-status’ alias gc=’git checkout’ alias gb=’git branch’ alias gbn=’git for-each-ref –sort=’-*refname’ –format=”%(refname:short)” refs/heads/’ alias gbl=”git for-each-ref –sort=’-committerdate’ –format=’%(committerdate)%09%(color:green)%(refname:short)%(color:reset)’ refs/heads”  

git branche – Obnova smazané branch

   $ git branch -D feature/my_brancheDeleted branch feature/my_branche (was f84d642).  🙁 $ git checkout -b feature/my_branche f84d642Switched to a new branch ‘feature/my_branche’  🙂  

git remote – Přidat vzdálený repositář

  $ git init $ git remote add origin https://uzivatel@bitbucket.org/Projekt/repo.git $ git remote -vorigin https://uzivatel@bitbucket.org/Projekt/repo.git (fetch)origin https://uzivatel@bitbucket.org/Projekt/repo.git (push)

git commit – Obnova staršího commitu

  1. přejit do branche, ze které se má obnovit starší commit git checkout master 2. vytvořit zálohu branche, např git checkout -b master zaloha/master-20170313 3. vrátit se do původní branche git checkout master 4.  zjistit id commitu, který se má obnovit git log …commit 6cfa7aeae04fc972bb092e468be0139c57db64d7Merge: 8375a8c 8e3661dAuthor: uzivatel uzivatel@adresa.nekde;Date:   Thu Mar 9 18:28:59 2017 +0100   …